Getting up from a ragdoll
This recipe is slightly more advanced but fun to implement. It makes our character use three different rigs: the original animated rig, the rig our character's mesh is skinned with, and a ragdoll. By using these three rigs, we can smoothly blend between ragdoll and animation any time.
Getting ready
Again, we are going to use the same character as in the Creating a humanoid ragdoll with the ragdoll wizard recipe. We will need two getting up animations: one from face facing down and one from face facing up positions. Name them StandUpFaceUp
and StandUpFaceDown
. We also need at least a looped Idle
animation.
You can also open the example Unity project and go to the Chapter 09 Physics and animations\Recipe 08 Getting up from a ragdoll
directory. If you open the Example.unity
scene there, play the game and press the space bar; the character will fall down using ragdoll. If you press the space bar again, it will blend from a ragdoll to a getting up animation and will be...