I have tried to add a ragdoll with the unity wizard which works great when I disable my animator but doest like to play ball when its enabled, I figured it would just be a case of disabling the rigidbodies but that also disables some of my meshes on the character in question, I tried a couple other ideas that I have left in the code bellow but am stuck on how to progress. Any help much appreciated
public void RagDoll(bool active)
{
for (int i = 0; i < rigidBodies.Length; i++)
{
//become a scateboarder, have control but slide around stuck in jump animation
rigidBodies[i].useGravity = active;
rigidBodies[i].isKinematic = !active;
//get stuck in a jittery crouch mode
if (!active)
rigidBodies[i].velocity = Vector3.zero;
//works but we lose our head as meshes also get disabled and not just the rigid body.
rigidBodies[i].SetActive(active);
//set our animator
animator.enabled = !active;
}
}