A fun feature of the UMA character is how easy it is to make the mode act as a rag doll. Perform the following steps:
- Select the UMADynamicCharacterAvatar GameObject in the Hierarchy window.
- Increase the number of slots for Additional Utility Recipes to 2, and drag the Physics HD Recipe UMA recipe into the new slot (from the UMA | Content | Example | Additional Slots | Physics | HD project folder):

Figure 7.40 – Adding the Physics HD recipe to the character
- Create the following C# script class and add it as a component to the UMADynamicCharacterAvatar GameObject in your Scene:
using UnityEngine;
using UMA.Dynamics;
public class SpaceKeyRagDoll : MonoBehaviour {
void Update() {
if (Input.GetKeyDown(KeyCode.Space))
{
MakeRagDoll();
}
}
private void MakeRagDoll() {
Transform avatar = GetComponent<Rigidbody>().transform.root;
UMAPhysicsAvatar physicsAvatar...