Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • 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
0
Question by J_Troher · Mar 26, 2015 at 05:43 AM · instantiaterandomexplosiondeath

Random Explosions around Gameobject on Death

I'm trying to make deaths look a little better, rather than just one explosion and a fade out.

I want to spawn explosion effects in random places around my gameobject's surface. The way I thought about doing it, was using some pre-determined areas placed around my gameobject, then spawning a random explosion from a list of prefabs in a random unit in sphere around that area..

But i want it to also only spawn a few here and there, short little "bangs" (which of course I have). The whole situation only lasts about 5-10 seconds. So theyll pop pop pop all over while it spins out of control, then at the very end one bigger special made effect with a nice little shockwave or something to finish it off.

I was going to do this in an enumerator, and have a while loop that started over every random range within a second, (so play 5-10 times based on length of said "death" ). And maybe instantiate a random as well from 1-10 explosions per shot. Then of course the last one at the end, when the gameobject is removed.

Thoughts? Ideas? Better ways?

Comment
Add comment
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

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by Hrungdak · Mar 26, 2015 at 06:34 AM

The first thing i thought of was "Particle System". You have all there that you need: Number of particles, spread, sub-particle-systems and a burst at the end.

If that's not feasible, then i would replace the normal gameObject, if it is to die, with an object thats prepared for destruction. The destructable object would have, as you mentioned, predefined areas, where explosions can occur, would have some parts, that could fly away, would have some particle systems, that pull off smoke or sparkles and an explosion object for the end explosion.

If you put all this information on your standard gameobject, you have a lot more clutter in your normal game that does for the worst reduce your performance with things you don't need. If your gameObject dies, delete it immediately and replace it with a new prefab that does all that dying without your further intervention.

Comment
Add comment · Show 2 · 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 J_Troher · Mar 26, 2015 at 06:36 AM 0
Share

This is what Im setting up, Is the destruction prefabs ;)

avatar image Hrungdak · Mar 26, 2015 at 07:30 AM 1
Share

Then go with it. The best solution imho.

Your answer

Hint: You can notify a user about this post by typing @username

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

Answers Answers and Comments

21 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Random death instantiate? 1 Answer

instantiating vertically 2 Answers

How to Spawn multiple game object one by one in random order 1 Answer

Spawn GameObjects without overlap 1 Answer

How to randomly spawn three non repeating gameobjects from an array? 2 Answers


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