• Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
Question by CarbonTech Software · Jun 28, 2010 at 11:54 PM · particlesexplosiontrailrocketsmoke

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

Comment
Tetrad
fireDude67

People who like this

2 Show 0
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

2 Replies

  • Sort: 
avatar image
Best Answer

Answer by spinaljack · Jun 29, 2010 at 12:24 AM

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.

Comment
Peter G
Tetrad
CarbonTech Software
cjmarsh

People who like this

4 Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Techsuport 1 · Mar 15, 2011 at 12:52 AM 0
Share

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

avatar image

Answer by herp johnson · Aug 28, 2012 at 04:02 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:

 function OnCollisionEnter(collision : Collision) 
 {
     yourGameObject.particleEmitter.emit = false;
 }
Comment

People who like this

0 Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image herp johnson · Aug 28, 2012 at 04:08 AM 0
Share

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

Unity Answers is in Read-Only mode

Unity Answers content will be migrated to a new Community platform and we are aiming to launch a public beta by June 9. Please note, Unity Answers is now in read-only so we can prepare for the final data migration.

For more information and updates, please read our full announcement thread in the Unity Forum.

Follow this Question

Answers Answers and Comments

1 Person is following this question.

avatar image

Related Questions

Spawned Particle System in game looks different from prefab 2 Answers

Trail Renderer which ignores parent movement 0 Answers

Particles behind/in front of other particles 1 Answer

Instantiated particles prefab has fewer particles 1 Answer

Rocket Explosion not applying damage when hitting ground 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges