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 BritishGuy · Jan 21, 2014 at 11:33 AM · collisionrigidbodycollidermissileaddexplosionforce

ExplosionForce On Instantiated Object

Hello.

I have a structure that once hit by another collider it will Instantiate a broken version of the structure in its place, Every thing works fine. All pieces of the broken structure have colliders and rigidbodys then the structure crumbles as intended.

I have a RPG that fires a missile, Once missile hits another collider it explodes with AddExplosionForce obviously causing anything with a rigidbody to be effected.

The missile hits the structure > Missile Explodes with force > Structure Instantiates then crumbles to the ground not effected by the Missiles explosive force.

The Missile should send the broken structure pieces flying all over the place but it dose not.

Is there a way to fix this problem? Sorry for the essay Thanks.

Comment
Add comment · Show 7
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 BritishGuy · Jan 21, 2014 at 12:31 PM 0
Share

I added a delay to the explosion force but its far too noticeable, There has to be another way

avatar image DynamicPrgm · Jan 21, 2014 at 02:00 PM 0
Share

I think that perhaps the force is added to the structure before the broken version is instantiated, meaning that there will be no force acting upon the broken structure. $$anonymous$$aybe a solution would be to wait one frame to add the explosion force if that's possible?

avatar image BritishGuy · Jan 21, 2014 at 02:40 PM 0
Share

Thanks for the reply, I did wait 1 frame but it was incredibly noticeable, The missile would hit, you would see structure falling for a split second, then out of nowhere the pieces fly all over the place, It's too much of a delay, Couldn't work out how to speed it up so its more of a , Hit > Switch > Bang > Debris

avatar image AlucardJay · Jan 21, 2014 at 07:55 PM 1
Share

Pass the variables in the explosion force to the script that instantiates the broken structure. Then when that script instantiates the broken structure, add explosion force to each piece.

avatar image DynamicPrgm · Jan 21, 2014 at 10:12 PM 1
Share

if you have a frame rate of 60fps it doesn't seem like waiting a frame would be that much of a difference.

However, a another possible solution would be to forget AddExplosionForce, and manually add force to the objects near the source of the explosion. By looping through the newly instantiated debris objects near the source and adding force to each one in an outward direction from the source, perhaps you could simulate an explosion adequately?

Show more comments

1 Reply

· Add your reply
  • Sort: 
avatar image
1
Best Answer

Answer by DynamicPrgm · Jan 22, 2014 at 03:36 PM

Here's the answer. If you have a frame rate of 60fps it doesn't seem like waiting a frame would be that much of a difference.

However, a another possible solution would be to forget AddExplosionForce, and manually add force to the objects near the source of the explosion. By looping through the newly instantiated debris objects near the source and adding force to each one in an outward direction from the source, perhaps you could simulate an explosion adequately?

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

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

20 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

Related Questions

Rigidbody stuck in colliders when moving and ricosheting. 0 Answers

OnCollisionEnter but have colliding object not move the object it collides with 1 Answer

What does rigidbodies sleeping have to do with collision detection? 0 Answers

handling collision with two objects of the same tag 1 Answer

Collisions between two rigidbody's and scripting collisions problem 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