- Home /
Particle System teleport: How?
Is there a way to teleport an entire particle system, including previously created particles, without losing them, even though they're originally created in world space?
Are you emitting to local or world space? If local, then yeah everything will move with the system. You'd just move the object holding the system.
Answer by BastianUrbach · Feb 14, 2019 at 07:25 AM
I don't know if it's the best way to do this but you could simply change the position of each particle using GetParticles and SetParticles
basically what @coeusueoc says. Be careful though when doing that. Depending on your emitter this will be heavy on performance. Is there an option for you to create your particles in local space ins$$anonymous$$d?
No option to do it in local space. The particles are a bit tricky. There's up to about 500 of them. Any idea how to calculate how long that would take to get and set 500 particles?
If you just get them, assign a new position and reset them to the system you should be fine. Do you intend to do this in an update function? And how many of those do you plan on having?
Answer by paul-masri-stone · Apr 01, 2021 at 11:31 AM
Yes. As you want to move not just the position that new particles are emitted from but also all existing particles, change transform.position
of the game object that has the particle system.