Character ragdoll to character animation?

Hi all. So I have this character modeled, rigged, and animated in Maya. I want to know if it is possible to switch back and froth between animation and the ragdoll. For example, the character starts off by being a ragdoll, and when he lands, a walking animation is played.

First use the Ragdoll Wizard (located in GameObjects->Create Other->Ragdoll...) and drag the limbs into the wizard to create the ragdoll.

Then in a script you would change the value of "isKinematic" for all of the ragdoll's individual rigidbody components to true, and then start playing an animation on it to have it be animation controlled.

To change it back to a ragdoll you would set all of the isKinematic values to false and stop the animation.

There’s several ways in which you can achieve your desired result, pyro’s suggestion being possibly the most common.

The alternatives being a ‘full ragdoll’ setup, where you actually always have a physics driven gameobject, and the instantiation approach, where you transition in and out of a ragdoll prefab to minimize instantiation and maximize performance for your game object.

The kinetic approach is good since it requires a single iteration to transform your game object into ragdoll, but requires a persistent collider setup which reduces performance.

The full ragdoll is the most fun since your game object will always behave as a ragdoll, and thus will be driven by forces which makes ‘falling’ transitions very easy, but it’s expensive in terms of resources, and can lead to somewhat unexpected behavior.

The instantiation approach is the less resource intensive, but requires tailoring for the various trigger events, and for the correct instantiation or of both the ragdoll and the original game object.

If you want to save time and trouble understanding how the ragdoll wizard works you can check URG!, an automatic ragdoll generator which is available in a free version, that will help you greatly in understanding proper ragdoll creation.

Unity forums thread

Site page