- Home /
ParticleSystem, Maintaining Particle position when emitter moves.
What I'm trying to achieve here is that I got 2 ParticleSystems on a moving vehicle, And when they emit smoke the particles follow the emitter as it moves. I'd like them to stay in same position with the same velocity even if the emitter moves and keeps emitting particles.
This is the code for the emitters:
var emitter1 : ParticleSystem;
var emitter2 : ParticleSystem;
var emitter1pos : GameObject;
var emitter2pos : GameObject;
...
if(emitter1.isPlaying)
emitter1.transform.parent = test.transform;
emitter1.transform.position = emitter1pos.transform.position;
emitter1.transform.rotation = emitter1pos.transform.rotation;
if(emitter2.isPlaying)
emitter2.transform.position = emitter2pos.transform.position;
emitter2.transform.rotation = emitter2pos.transform.rotation;
...
emitter1.particleSystem.Play();
emitter2.particleSystem.Play();
The test object was just to try to get the particles parent to be in a empty GameObject to keep them in place, But it didn't work.
Answer by andeeeee · Aug 29, 2012 at 02:02 PM
If you change the Simulation Space value from Local to World in the inspector, the particles will not follow the emitter.
Your answer
Follow this Question
Related Questions
How do I generate - IN CODE - a ParticleSystem for static particles? 1 Answer
Difference between particle system and emitter? 1 Answer
how can I get particle.position out of shuriken system? 2 Answers
expanding ring velocity (ellipsoid particle emitter) 1 Answer
How to inherit rotation from parent object with Shuriken Particle System? 0 Answers