Hello, I currently have a rocket (instantiated) that instantiates an explosion when its collider is triggered. This rocket has a smoke trail (smoke particles with 0 local or world velocity).
I want the smoke to "hang" in the air even after the explosion is finished (so destroying the entire game object is not an option). Unfortunately, when the rocket explodes, the smoke leaves a "smoke cluster" which is basically the smoke collecting together to the point of impact.
I need a smoke trail that slowly dissipates, doesn't leave a "smoke cluster", and doesn't just disappear right away unnaturally (via destroying or hiding).
Thanks in advance, CarbonTech Software Admin
You can try clicking simulate in world space to stop the particles moving with the missile.
Set the min and max energy for how long you want the particles to hang around for.
After the missile explodes you can unparent the emitter from the missile before destroying the missile so that the smoke hangs around. (Stop the emitting at this time as well)
Setting a script to destroy the emitter a set time after being detached will prevent lots of smoke emitters cluttering up the game.
Where maxLife is the maximum amount of time a particle will hang around for so you can be sure every particle has gone before removing the emitter object.
answered Jun 29 '10 at 12:24 AM
That's a complicated way to do it, jack. Why not use the tools with which Unity has already provided us? Most of this can be accomplished through Inspector. There is no need for complicated script to destroy the emitter--the only scripting required is to set particleEmitter.emit to false.
Use a particle emitter, a particle renderer, and a particle animator. Select your material in the particle renderer. In the particle animator's color animation section, you can change the Alpha value (A) to change the opacity of the material. In this case, you would make the alpha (A) a value of 0 in the last color block to fade out the trail.
As for stopping your "cluster," you can set yourGameObject.particleEmitter.emit to false on collision with the target object. So basically, you'd end up with something like this: