• 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 rusanoff · May 21, 2015 at 09:41 AM · collisionphysicsrigidbody

How to make object correctly disperse into physical children on impact.

Good day. The thing i am trying to achieve lookes pretty simple and straightforward.

Say there is an object consisisting of several children - cubes that is. All of them have rigidbodies, colliders and everything. They are set to isKinematic.

a bullet is fired (say a cube also) with high mass.

On impact with this object i want to make all these children to non kinematic so that it would look that this object is destroyed and all the pieces are flying all around.

and i do that - pretty simple - on impact with one of the children script makes all children non kinematic.

HOWEVER. the problem i am having - SOMETIMES - the bullet hits the object, looses all velocity and falls to the ground. the same goes for this object i am trying to destroy. pieces do not fly all over- they just fall togeter to the ground. - that is being that collision is detected, but the impact of mass and velocities is not accounted for.

i understand that is hat happens:

ideally is should work: bullet flying - collision - everything set to physical - collision physics calculated - success

in this case - this is what happens: bullet flying - collision - collision physycs calculated(that is being the same as hitting the unmovable wall) - everythyng set to physical - not good at all =(

i have managed to work around that by moving the bullet to position it had at previous physics step before collision - with the velocity it had at the time.

this works perfectly, byt as you can imagine looks unnatural as bullet teleports slightly back on impact if you look carefully.

Is there a more elegant way around it? How wold you achieve this?

sorry for my english - not a first language

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

0 Replies

· Add your reply
  • Sort: 

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.

Welcome to Unity Answers

If you’re new to Unity Answers, please check our User Guide to help you navigate through our website and refer to our FAQ for more information.

Before posting, make sure to check out our Knowledge Base for commonly asked Unity questions.

Check our Moderator Guidelines if you’re a new moderator and want to work together in an effort to improve Unity Answers and support our users.

Follow this Question

Answers Answers and Comments

2 People are following this question.

avatar image avatar image

Related Questions

Can you tell when an Interactive Cloth is colliding with another object? 1 Answer

Rigidbodies won't collide if mass difference is too high 0 Answers

Character Controller meets Rigidbody 1 Answer

How to get collisions on Character controller? 1 Answer

Rigidbody.MovePosition/MoveRotation Hits far away colliders 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