beeglebug Posted November 1, 2013 Share Posted November 1, 2013 Is there any way using the publicly exposed method on an emitter to control the speed of particles without affecting the direction they are emitted from? I am trying to create slowly falling particles, but when I change the minParticleSpeed and maxParticleSpeed properties all I get is particles coming out in a small cone. Link to comment Share on other sites More sharing options...
Chris Posted November 1, 2013 Share Posted November 1, 2013 Did you decrease the gravity value of the emitter by the same amount? When you decrease the particle speed, but leave the gravity unchanged, of course they will fall in a different shape.Imagine it like throwing a ball with very small force. It won't follow the same trajectory, only slower. It will fall down right before your feet. But if you were able to decrease the earth's gravity, the ball would fly the exact same path as a harder thrown ball with more gravity. Hope thats understandable Link to comment Share on other sites More sharing options...
onedayitwillmake Posted November 2, 2013 Share Posted November 2, 2013 If it's possible to iterate over the particles, you could take their current speed and multiply it by some damping value, such as 0.9Is that what you mean? Sorry if I miss ubderstood Link to comment Share on other sites More sharing options...
beeglebug Posted November 3, 2013 Author Share Posted November 3, 2013 That's not exactly what I meant, no. Sorry if I didn't explain it very well. I'll roll up an example later today and show you guys what I mean. Link to comment Share on other sites More sharing options...
beeglebug Posted November 3, 2013 Author Share Posted November 3, 2013 Ok, i've had a detailed play with the particles for a while now, and I understand it much better now. My earlier confusion comes from the fact there is a single pair of properties, minParticleSpeed, and maxParticleSpeed, which actually control two things, the initial direction of the particles, and their speed. Tecnically, these properties should probably be called "velocity" not speed (velocity being a direction plus a speed), and to give more flexibility perhaps speed could be moved out into it's own property? Perhaps this is a candidate for a plugin? Phaser Advanced Particles anyone? Link to comment Share on other sites More sharing options...
kstamatov85 Posted August 9, 2015 Share Posted August 9, 2015 Hi, I was on a same issue and it took me time to find how to use minParticleSpeed and maxParticleSpeed.The documentation say: minParticleSpeed : Phaser.Point The minimum possible velocity of a particle.Which is not very helpful at all, because there is no clue how to use it or set it and what kind of parameters it needs.There is nothing in the examples as well.Anyway I found this tutorial which open my eyes for those.//make the player explodevar emitter = this.game.add.emitter(this.player.x, this.player.y, 100);emitter.makeParticles('playerParticle');emitter.minParticleSpeed.setTo(-200, -200);emitter.maxParticleSpeed.setTo(200, 200);emitter.gravity = 0;emitter.start(true, 1000, null, 100);this.player.kill(); Tilde 1 Link to comment Share on other sites More sharing options...
Recommended Posts