Advanced Locomotion System Ⅴ

Ragdoll Start

  1. Clear the Character Movement Mode and Set Movement State to Ragdoll.
  2. Disable Capsule collision and enable mesh physics simulation starting from the pelvis(Physics Asset에서 root 본의 Physcics Type은 Kinematic으로 설정되어야 함).
  3. Stop any active montage.

Ragdoll Update (Tick)

  1. Set the Last Ragdoll Velocity
  2. Use the Ragdoll Velocity to scale the ragdoll’s joint strength for physical animation.
  3. Disable Gravity
  4. Update the actor location to follow the ragdoll.

Set Actor Location During Ragdoll (Tick)

  1. Set the pelvis as the target location.
  2. Determine wether the ragdoll is facing up or down and set the target rotation accordingly.
  3. Trace downward from the target location to offset the target location, preventing the lower half of the capsule from going through the floor when the ragdoll is laying on the ground.

Ragdoll End

  1. Save a snapshot of the current Ragdoll Pose for use in AnimGraph to blend out of the ragdoll.
  2. If the ragdoll is on the ground, set the movement mode to walking and play a Get Up animation. If not, set the movement mode to Falling and update character movement velocity to match the last ragdoll velocity.