Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 14 Next capture
2021 2022 2023
2 captures
13 Jun 22 - 14 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 Blizzard_jedi · May 04, 2013 at 02:04 PM · rigidbodycolliderragdoll

Rigidbody+collider conflicts with ragdoll structure

Hello, the commUnity! :)

Currently I'm working on a character controller system, based on using Mecanim (animations move the character). So I've watched this tutorial and made practically the same. In particular, I've added a rigidbody component and a capsule collider to the character. Everything worked fine, until I've decided to use a ragdoll instead of a death animation: the character now slides slightly in the forward direction. In fact, it is standing on the horizontal plane, so the gravity force doesn't seem to be able to move the character.

Comment
Add comment · Show 2
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 ExTheSea · May 04, 2013 at 02:10 PM 0
Share

Do you use your actual player to make the ragdoll because if that's the case i would suggest you use a seperate $$anonymous$$odel which you set up using only ragdoll and colliders. If the player dies you can just replace the player with the Ragdoll-Prefab. I didn't yet use macanim really so i don't know if any of that could interfer with the ragdoll.

avatar image Blizzard_jedi · May 04, 2013 at 02:25 PM 0
Share

Yeah, I'm using exactly the same character as the one, I'm controlling, and the one, carrying the ragdoll structure. Thanks a lot - your suggestion seems to be a good idea!

Btw, if anyone has information about the conflicting relations of ragdoll and collider - post a comment, please. I'm still interested in understanding the reason for this situation.

3 Replies

· Add your reply
  • Sort: 
avatar image
4

Answer by Wieljer · May 13, 2015 at 07:37 PM

I wanted to reply to this older post because it was the only post that seemed relevant to an issue I had been looking for an answer to. I hope this will help others trying to fix the issue.

In my instance of this problem, the ragdoll was colliding with the character controller Capsule Collider. alt text

In the picture attached you can see the larger character controller capsule sphere and then the ragdoll capsules and boxes around each limb of the character. What was happening in my scene was the physics engine was battling the capsule collider causing many collisions. This resulted in my character moving in a direction and in my case many directions pretty quickly so I was basically flying around the map... It was very confusing. So I then tried to remove the animator and found that my character was no longer flying because he would just ragdoll without any animations playing. But i noticed that when I hit 'play' the character ragdoll would launch away from the larger capsule collider to get out of it. I then realized that you must use the edit>project settings>physics tap to set the layers so that they ignore collisions on each other. In my case i set the hips of the character (which contains all of the characters limbs) to the 'ragdoll' layer and then unchecked the 'player' layer which was where my sphere collider resides. Then bam no more flying or weird ragdoll getting launched away from my capsule collider.


capsulecollision.png (420.8 kB)
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 ElDivinCodino · Jul 21, 2016 at 12:20 PM 0
Share

You saved me! Thank you very very much!

avatar image gracsoo · Jan 26 at 10:21 PM 0
Share

Thank you!!! very helpful!

avatar image
1

Answer by F0rge1cE · Feb 17, 2017 at 09:14 AM

Three steps to solve this problem:

  1. set your character to "player" layer, only the top object, do not include children. (you should create this layer yourself)

  2. set the character's hips to "Ragdoll" layer. Also, create the layer by yourself. This time include all chidren of hips.

  3. add this line to your script: (assume layers created above are layer8 and layer9)

    Physics.IgnoreLayerCollision (9, 8, true);

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

Answer by Rufox · Dec 23, 2017 at 11:56 AM

It works perfectly! Thanks!!!

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

19 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

Related Questions

Ragdoll with multiple colliders 0 Answers

force before ragdoll 1 Answer

Collision Problem 1 Answer

collision child with rigidbody in parent 0 Answers

OnCollisionEnter but have colliding object not move the object it collides with 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