• 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 Erik-256 · Jul 25, 2018 at 04:16 PM · physicsanimator controllerragdoll

Ignore past forces when isKinematic is set to false

My ragdoll seem to be affected by affected by the forces that were there before I actually activate it.

I have a number of characters controlled by an animator for most of the game, until, at some point they die. When it happens I deactivate the animator, and set their ragdoll.isKinematic to false. I'd like them to slowly and 'elegantly' fall down, but instead they get thrown violently across the scene. I understand this is a common problem (I could not find a solution to), and it seems to be related to how forces keep getting applied to the ragdoll, and when isKinematic is deactivated, they just act on the ragdoll all at the same time. Which makes sense, because if I activate my "Death" function as soon as I start the game up, they fall down nicely, exactly the way I'd like them to.

Any suggestion would be appreciated. I have already tried deactivating detectCollision until the ragdoll is activated, to call the ResetInertiaTensor function and to set all CollisionDetection to Continuous Dynamic, but they don't seem to do anything or (in the case of changing the collisionDetection anddetectCollision) make things worse.

Here's my "death" function, for reference, where "boneRig" is the Component array of all the rigidbody components in the object.

     public void Death()
     {
         GetComponent<Animator>().enabled = false;
         foreach (Rigidbody ragdoll in boneRig) {
             ragdoll.isKinematic = false;
         }
     }
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 Bunny83 · Jul 25, 2018 at 04:50 PM

Make sure your seperate "limbs" do not collide with each other. So put them on a seperate layer and deactivate collisions within that layer. Also make sure that if the whole character has a collider / charactercontroller you have to deactivate / remove those. Otherwise your seperate rigidbodies would overlap and get seperation forces applied. That's also the reason why you want to deactivate collisions between the rigidbodies.

Comment
Add comment · 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 Erik-256 · Jul 25, 2018 at 09:18 PM 0
Share

Thanks, although it doesn't seem to solve the problem. It stills falls down quite normally is Death() is activated right away, and gets thrown away if I wait until Death() actually has to be activated.

It's still quite useful, though. I've been only testing with T Pose for now, where the rigidbodies of the limbs not collide anyway, but I would have run in that problem once I start animating.

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

152 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 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 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 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 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 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 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 avatar image avatar image avatar image avatar image avatar image

Related Questions

2D Ragdoll 1 Answer

How can I make character become a ragdoll with isKinematic? 1 Answer

human character with ragdoll hair 2 Answers

How to make Character Joint rotate towards a rest position? 0 Answers

How to Control A Ragdoll 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