Version: 5.3 (switch to 5.4b)
Мастер Ragdoll
WheelCollider Tutorial

Joint And Ragdoll Stability

Tips for improving joint and ragdoll stability.

  • Avoid small joint angles of “Angular Y Limit” and “Angular Z Limit”. Depending on your setup the minimum angles should be around 5 to 15 degrees in order to be stable. Instead of using a small angle try setting the angle to zero. This will lock the axis and provide a stable simulation.

  • Set the joint property “Enable Preprocessing” to false (unchecked). Disabling the preprocessing can help against joints “blowing up”. Joints can “blow up” if they are forced into situations where there is no possible way to satisfy the joint constraints. This can occur if jointed rigid bodies are pulled apart by static collision geometry, like spawning a ragdoll partially inside a wall.

  • Ragdoll stability or stretching: If ragdolls are given extreme circumstances, such as spawning partially inside a wall or pushed with a large force, the joint solver will be unable to keep the rigid bodies together. This can result in stretching or a “cloud of body parts”. Please enable projection on the joints, using either “ConfigurableJoint.projectionMode” or “CharacterJoint.enableProjection”.

  • If bodies connected with joints are jittering try increase Edit->Project Settings->Physics->“Solver Iteration Count”. Try between 10 or 20.

  • Never use direct use direct transform access with kinematic bodies jointed to other bodies. Doing so skips the step where PhysX computes internal velocities of corresponding bodies and thus makes solver provide unpleasant results. We’ve seen some 2D projects using direct transform access to flip characters via altering “transform.direction” on the root boon of the rig. This behaves much better if you use MovePosition / MoveRotation / Move instead.

  • Avoid large differences in the masses between jointed rigid bodies. It’s okay to have one body with twice as much mass as another, but when one mass is ten times larger, or even higher, than the other then the simulation can get jittery.

  • Try to avoid scaling different from 1 in the Transform containing Rigidbody or the Joint. The scaling might not be robust in all cases.

  • If Rigidbodies are overlapping when inserted into the world and you cannot avoid the overlap then you can try to lower the Rigidbody.maxDepenetrationVelocity to make the bodies exit out of each other in a more smooth manner.

Мастер Ragdoll
WheelCollider Tutorial