2D Smoke or Particle


what i’m trying to achive is a smoke or a cloud that disappear after a second (like the mac dock when you move an icon out of it [13458-screen+shot+2013-07-24+at+12.02.53+pm.png|13458])

the smoke or cloud appears when i enable it and after a second it disappear like the mac dock example


PS: my game is 2D and using JS.

Not really sure what you are asking but im going to guess your asking if you should make your own “2D smoke” or use the particle system built into unity.

If by 2D smoke you mean making your own 2D particle effect then I would just make a particle effect with the particle system that is already there. If you need help with either one I suggest posting what you have tried that way it is easier for us to help you.

You can do this…
When you want to make this effect… enable your cloud… Move it up and then lerp its alpha to zero… Or you can make an animation for that and call that animation

Example :

public Transform cloud;
//When you want your cloud to appear -

cloud.gameObject.active = true;
// To move it to a distance of 0.5f up
cloud.transform.position = new Vector3(cloud.transform.position.x,Mathf.Lerp(cloud.transform.position.y,cloud.transform.position.y+0.5f,2f),cloud.transform.position.z); 

//for disappearing your cloud in your disappear condition write

cloud.gameObject.renderer.material.color.a = Mathf.Lerp(1f,0f,2f);

All these things should be in update