- Home /
Particle emission : Give each particle a specific direction
Hi,
So in my 3D FPS game I want to emit particles when I click, that go where the mouse look. I have all this code working and when I click I use Particle.Emit(1).
To give each particle a specific direction I calcul where is pointing the mouse in local space, and convert this to have the point in world space. Then I simulate the particle in world space and I give it VelocityOverTime with world space coordinated. So each time I emit a particle it have a correct direction.
HOWEVER, if I already have particles going to direction A, and I click again poiting to a direction B, ALL of the particles will go to point B. Even those instanciated with a previous click. So my question : how do I give each particle a direction like I'm doing but after that they don't depend anymore of the particle system, so that instantiating new particles will not change their direction?
Thanks!
Answer by richardkettlewell · Aug 13, 2018 at 06:54 PM
You need this: https://docs.unity3d.com/ScriptReference/ParticleSystem.Emit.html
See the second example using EmitParams to overrride properties of only the newly emitted particle(s)
Your answer
Follow this Question
Related Questions
Particle system does not re-emit until Start Lifetime elapsed 4 Answers
How can i accomplish fog at the edge of my map. 0 Answers
Particle System not working properly on Android 0 Answers
Smoke Particle Not Playing Continuously 2 Answers
Make Start Color setting in particle system control _EmissionColor 1 Answer