Particle System Help.
Hello,
I'm trying to play a particle system effect when i disable my obstacles. However i can't find a way to let my effect know where is my obstacle positions. And i cant attach the particle system as a child of the obstacle because when i disable the obstacle the particle will also get disabled. Is there any way to fix this issue? I want a particle effect to play when i disable my obstacle and after that disable the particle system.
I'f my question is still not clear please inform me.
Thank you
Hi, You could parent the particle to the obstacle, then have the particle parent to null when the obstacle is destroyed, the particle will be in the correct position and will play on until it's finished.
Answer by TBruce · Jul 07, 2016 at 02:01 AM
The best way to do this is to create a gameobject (reset its position) and attach your particle system to the gameobject and save it a a prefab (once you have saved the prefab you can delete the gameobject in the hierarchy).
Now to play the particle effect you just instantiate the prefab and set the position of the instantiated object to the position of the current object.
Once that is done you can destroy the current object.
Your answer
Follow this Question
Related Questions
Particle Collision between particles 2 Answers
How Play and Stop a ParticleSystem through Scripting? 9 Answers
How to Instantiate decals where particles from particle system hits? 1 Answer
C# scripting and Particle System incompatibility 1 Answer
How can i get effect shown in video attached in link? 0 Answers