Rocket Particle Smoke Fade-Away

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

more ▼

asked Jun 28, 2010 at 11:54 PM

avatar image

CarbonTech Software
256 50 35 53

(comments are locked)
10|3000 characters needed characters left

2 answers: sort voted first

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.

Use Destroy(gameObject,maxLife);

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.

more ▼

answered Jun 29, 2010 at 12:24 AM

avatar image

9.9k 27 60 132

so what ways are there to get particles to fade in/out, the particle animator isnt working for me

Mar 15, 2011 at 12:52 AM Techsuport 1
(comments are locked)
10|3000 characters needed characters left

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:

 function OnCollisionEnter(collision : Collision) 
     yourGameObject.particleEmitter.emit = false;
more ▼

answered Aug 28, 2012 at 04:02 AM

avatar image

herp johnson
66 20 25 26

Sorry I posted this so late, but I hope it helps you streamline the process next time you're using particle emitters! :)

Aug 28, 2012 at 04:08 AM herp johnson
(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments



asked: Jun 28, 2010 at 11:54 PM

Seen: 5441 times

Last Updated: Aug 28, 2012 at 04:08 AM