- Home /
Question by
Babagazeus · Sep 27, 2012 at 08:40 PM ·
particlesystem
ParticleSystem interpolates position when moved and off
I want to start a particlesystem, move it as it runs, turn it off, move it more, then repeat. However, when I turn it off, move it, and turn it back on, it draws particles along a line between the current point and its last position.
pSystem.Stop();
//frames pass
pSystem.transform.position += new Vector3(0, 10, 0);
pSystem.Play();
On the next frame, the particles appear from the old position to the new one. Is there a setting to disable this?
Comment
Best Answer
Answer by Babagazeus · Sep 28, 2012 at 03:53 PM
I worked around this by using the ParticleSystem.enableEmission property. So after calling Play, I disable emissions:
pSystem.Play ();
pSystem.enableEmission = false;
On the next frame, I re-enable emissions. That way the ParticleSystem position interpolation logic runs while emissions is disabled. Thus, no particles appear.