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
1
Question by Ekta-Mehta-D · Sep 17, 2013 at 07:30 AM · collisionexplosion

Explosion with Broken Parts Unity3d

Hello everyone..

I want explosion on 3d character model. On explosion i want characters body parts to be exploded in random direction.

But i have no idea about how to do such type of explosion effect. Please help me, what kind of script should i write?

Thanks in advance for your support and help.

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
Best Answer

Answer by Fattie · Sep 17, 2013 at 08:04 AM

It's a common thing:

(1) have your model "normal" (perhaps a prefab, if you work that way)

(2) have your model "after death" (perhaps a prefab, if you work that way)

At the moment of death, in fact SWAP from prefab A to prefab B

This is very common in video games. Often when you play a game, the character is swapping from one version to another. Even though it LOOKS THE SAME, it's a totally different prefab for a different purpose.

Now in this situation. When you swap to "prefab dead". That new prefab IS IN FACT, MADE IN SMALL PIECES. It might have say 7 pieces.

Once again -- IT IS A TOTALLY UTTERLY DIFFERENT PREFAB.

So, you swap to the "dead" prefab. And then, since it has seven pieces, you have an animation, forces, or whatever you want to make them blow apart.

It's actually a big part of video games and has a lot of engineering details associated. (For example, it's often not so easy to swap from prefab A to prefab B - you have to match all the positions etc.)

So that's the basic idea and that's exactly how you do it.

For detailed questions on this ask another question or search on here for 100s of QA about it.

Comment
Add comment · Show 3 · 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 Ekta-Mehta-D · Oct 04, 2013 at 05:49 AM 0
Share

yeah sir but how will i start animation from explosion point.? I have created broken parts prefab and i have destroyed my main game object now i am planning to do animation like blowing parts in air from that point. And it is 2d scene so my object is moving in x-y plane.

avatar image Fattie · Oct 04, 2013 at 06:54 AM 0
Share

Sure, are you using physics? So, rigidbody and colliders?

IF SO, simply set a velocity (rigidbody.velocity) for each part, so one line of code for each part. Play it and see if it looks good. Adjust until it looks good.

If you are not using physics at all.

Very simply, you will have to make an animation for each part (just use the "animation" screen in Unity). So, the arm would fling up in the air and then down to the ground. You would do an animation for each one.

That's all there is to it.

You must tick this question as closed and then do not hesitate to ask a new different question about animating explosions.

What you were asking here was about swapping to a new model which is a key technique in video games.

You must now close this question please, thanks. Do not hesitate to ask a new question.

avatar image Ekta-Mehta-D · Oct 04, 2013 at 07:07 AM 0
Share

Hmm thanks sir..

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

16 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

Related Questions

A node in a childnode? 1 Answer

Collision problem 0 Answers

Creating a draggable object - and defining areas. 1 Answer

Adding collision detection to movement script... 1 Answer

Collision will not work 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