- Home /
Ragdoll won't respond to graivty when isKinematic set to false
I have an NPC with limb colliders set up with Unity's ragdoll wizard, all the colliders set to isKinematic. The NPC is also using a Mecanim Animator and has a health script, where when its health reaches zero all the colliders are set to isKinematic = false and the Animator is disabled. Here's the death script:
private Component[] boneRig;
private Animator selfAnim;
void Start(){
boneRig = gameObject.GetComponentsInChildren<Rigidbody>();
selfAnim = gameObject.GetComponent<Animator>();
}
public override void Die(){
Debug.Log("Dead!!!");
foreach(Rigidbody ragdoll in boneRig){
ragdoll.isKinematic = false;
}
selfAnim.enabled = false;
}
In the Inspector, the Animator is properly disabled on death and all of the ragdoll colliders have isKinematic to false. But NPC will just go from its idle animation to the default pose it starts with. It doesn't collapse and only the arms seems to move a little if I have my FPS character (capsule collider) run into it. What could be an issue causing the ragdoll to not behave properly? Does using an Animator change it any? Because the same set up was working fine for NPCs I had using an Animation component instead of an Animator.
Never$$anonymous$$d, it was an issue with an asset. Got it working now
Your answer
Follow this Question
Related Questions
force before ragdoll 1 Answer
Ignore Colliders of an Object 1 Answer
crash build version on colliding with Kinematic collisions 0 Answers
Custom Ragdoll Autorigger Setup 1 Answer
Trouble with putting colliders on Blender imported FBX Ragdoll 0 Answers