- Home /
Rigidbody causes ragdoll character to fly
Hi,
I've created character in Blender, rigged it, animated in Mecanim and wrote scripts to control the character. Everything works great, but when I added ragdoll something went wrong. When character is in ragdoll state, just lying on the ground, it's okay, but when I try to set the character to be playable, it just flies away to its' right hand direction. By searching the net and checking differenct setups, I've pinpointed the problem to rigidbody component of the character. When 'Is Kinematic' bool is true, then the problem doesn't occur, but when it's not, then the character flies wildly. It wouldn't be a big deal, but I need the rigidbody to move my character around, as I use it in player controller script. Any idea how to fix the problem without deleting the whole rigidbody component?
Thanks.
Answer by AkaLuuk · Mar 15, 2018 at 11:29 AM
Have you disabled the Nav Mesh Agent on the Ragdoll object? It worked for me!
Answer by artwhaley · Feb 13, 2019 at 03:47 AM
I know I'm necroing a post from ages ago, but i just spent 2 days trying to find the answer to the same problem and this was the top result, but none of the replies worked for me. So here's what did -
I was having crazy collisions between my 'character controller' and my individual bone colliders for the rag doll. disabling collisions in the character controller didn't help. Disabling the character controller didn't help!
What finally helped - putting the top level game object where the character controller, navmesh agent, rigidbody, and behavior scripts go on one layer, and moving all of the child elements - the skeleton with the ragdoll colliders - to a different layer, then disabling collisions between them. At the top of my behavior script I added Physics.IgnoreLayerCollision(9, 10);
That was the missing bit for me that none of the 5 minute tutorials that make it look super easy mentioned! Hope it helps!
Answer by Headworker · Jan 29, 2014 at 08:44 PM
From my adventures into ragdoll wiring it could be the following:
Your character works before you made him ragdoll/non kinematic? The problem occurs if you want to switch back?
It can either be a missing transition from the ragdolled "lying" state to one of your animation state ("idle" for instance).
Other possiblity : Creating a ragdoll actually adds colliders and joints (afaik), another level of animation hierachy. if you switch kinematic off, these colliders could be in interfering with your joint setup. Try to deactivate the ragdoll hierachy (all the colliders and joints which make up the ragdoll) while the setup is kinematic.
Well, actually my character is non-kinematic and working well being so. I would make it kinematic if it wasn't for scripts which require the rigidbody's 'Is $$anonymous$$inematic' bool to be false.
@Ryty please don't post comment as an answer.
this is your final warning next time I'll reject your answer.
sdgd: ?
Ryty: Did you check for interfering ragdoll colliders? try to put your setup on a simple cube for instance, so you can debug the rigidbody behaviour in a simple environment.
Your answer
Follow this Question
Related Questions
How can I stop a rigidbody (Ragdoll) character from colliding with the Character Controller capsule? 1 Answer
How to disable Rigidbody component completely 6 Answers
Collision between rigid body zombie characters. 1 Answer
How to walk stairs with active ragdoll made of rigidbodies? 1 Answer
Problems with ragdolls and no gravity 0 Answers