Menu
Lumberyard
Legacy Reference

Applying Simulation Settings to Ragdoll Joints

You will want to apply rotation limit values to your joints used for ragdoll depending on what ranges you want the joint to have. The default values are set to 0 degrees, but the range is -90 to 90 degrees, with the lowest range value being set in the rotation minimum and the highest range value being set in the rotation maximum. If you need more than the -90 to 90 degree y-axis range, you will need to create a physParentFrame node. For more information, see Using physParentFrames.

Any joint that has 0 degrees set for all the rotation limit ranges and is not in the Active and Limited states will be treated as non-physicalized. For this reason, it is a good idea to set some random limit ranges on joints that do not have a phys mesh proxy, but have child joints that do have a phys mesh proxy so the rest of the chain will still be physicalized. You will not need to enable the Active and Limited states for these joints either. For example, if you have a clavicle joint with no phys mesh proxy that is the parent of your shoulder joint that had a phys mesh proxy, you will want to add some values to the clavicle joint so the shoulder will still exhibit ragdoll behavior, but do not set any of the rotations in the Active/Limited states.

To apply simulation settings using Maya

  1. Open Maya and select the root joint for your skeleton.

  2. Select Lumberyard Tools from the Lumberyard Shelf.

  3. Select Tools, Add Attributes.

  4. In the Attribute Editor, scroll down to the Extra Attributes panel for the root joint.

    The panel shows the ragdoll simulation settings that have been applied. This is true for every joint in the hierarchy.

  5. Apply the desired simulation values for your ragdoll skeleton joints.

    Select the Rot Limited check boxes for your coordinates to limit rotation to the specified values. Clear the check boxes for unlimited rotation.

  6. Place the lowest range value in the Rot Limit Min field and place the highest range value in the Rot Limit Max field for the x-, y-, and z-axes. For example, a joint in the -70 to 0 degree range for the y-axis would have -70 in the Rot Limit Min (second-column) field and 0 in the Rot Limit Max (second-column) field.

    Note

    For Maya users, there is one exception to the Rot Limited check boxes in the case of the pelvis/hip joint. You will want to apply some values for the Rot Limit Min and Rot Limit Max fields for the pelvis/hip joint, but keep the Rot Limited check boxes unchecked.

  7. After simulation settings have all been applied, export the character skeleton .chr file and the material group or multi-material that contains the phys mesh materials.

  8. In Lumberyard, use the character skeleton .chr file as part of a .cdf as normal for character assembly.

  9. Open Geppetto and preview your phys mesh proxies by enabling Display Options, Physics, Physical Proxies, and view Ragdoll Joint Limits.

To test your ragdoll, use either the Ragdoll component entity or the legacy DeadBody entity. For more information, see Ragdoll Physics

To apply simulation settings using 3ds Max

  1. Open 3ds Max and select any skeleton joint.

  2. Click the Hierarchy tab.

  3. Click the IK button under the name of your joint.

  4. Scroll down to the Rotational Joints panel.

  5. Apply the desired simulation values for your ragdoll skeleton joints.

    When using the X, Y, Z rotations for ragdoll, enable the Active and Limited check boxes for the axes you are using and disable the Active check box for the axes you are not using.

    Place the lowest range value in the From field and place the highest range value in the To field.

  6. Set Damping to 1 for an active axis.

  7. After simulation settings have all been applied, export the character skeleton .chr file and the material group or multi-material that contains the phys mesh materials.

  8. In Lumberyard, use the character skeleton .chr file as part of a .cdf as normal for character assembly.

  9. Open Geppetto and preview your phys mesh proxies by enabling Display Options, Physics, Physical Proxies, and view Ragdoll Joint Limits.

To test your ragdoll, use either the Ragdoll component entity or the legacy DeadBody entity. For more information, see Ragdoll Physics

Other Parameters

The Spring Tension parameter controls the stiffness of an angled spring at a joint. The default value of 1 means the acceleration of 1 radian/second2 (1 radian = 57 degrees).

The Damping parameter controls how loose the joint will be in the ragdoll simulation. The default value of 1 is recommended because it corresponds to fully-damped oscillations for the joint.