Hey everyone.
I’ve spent the last few weeks banging my head against the wall trying to create a truly active ragdoll with procedural balance (like GTA 4, RDR2, or Half Sword) in Unreal Engine 5. I tried GASP, pure physics, Locomotor, and manual IK. I went through the “carousel bug”, the “rocket butt” (character flying into space), and the mesh detaching from the capsule.
I talked to several developers, read academic papers on Capture Points and SIMBICON, and finally cracked the code.
I am sharing the complete, end-to-end architecture so you don’t have to suffer for weeks like I did. If you see any flaws or have better implementations, please let me know in the comments!
The Core Philosophy
Never switch to a passive ragdoll. The body is ALWAYS simulated. Balance is achieved by a hybrid approach: Kinematics (Control Rig) drives the goals, Physics (Motors) drives the weight.
The Ultimate Pipeline
Here is the exact order of operations:
1. Capsule & Movement (ALS v4): Your base character moves normally. Crucial: Disable collision between the Skeletal Mesh and the Capsule (Ignore Pawn channel on the mesh). If you don’t, the capsule will push the mesh, and the mesh will push the motors, resulting in infinite jitter or the “rocket effect”.
2. Control Rig (The Brain): Inside your AnimBP, plug in a Control Rig.
· Use Locomotor to calculate where the feet should step.
· Use Full Body IK (FBIK) to calculate how to bend the knees to reach those targets.
3. Pose Snapshot (The Bridge): Right after the Control Rig in your AnimBP, save the final kinematic pose using Save Pose Snapshot (e.g., name it “CR_Pose”).
4. Physical Animation Component (The Muscles): In your Character BP, add a Physical Animation Component.
· In BeginPlay, set the Skeletal Mesh and apply a Physical Animation Profile.
· In Tick (or via an Anim Notify), call Set Target Local Transforms From Pose Snapshot and feed it the “CR_Pose”.
5. Physics Asset (The Flesh): Set up your Angular Drives (Twist and Swing). The Physical Animation Component will automatically read the Pose Snapshot and drive the motors to match the Control Rig’s pose, while realistically reacting to hits.
The “Secret” Locomotor Settings (For Realistic Walking)
Default Locomotor settings make your character bounce like a kangaroo. Use these for human bipeds:
· BobOffset: -3.0 (Lower the pelvis for a natural posture).
· BobStiffness: 150.0
· BobDamping: 0.9
· LeadAmount: 3.0 (Pelvis moves ahead of the feet, creating physical inertia).
· OrientToGroundPitch / Roll: -0.3 (Crucial for bipeds!).
· Airborne Step Percentage: 0.35
· Step Height: 8.0
How to avoid the biggest bugs:
· The “Rocket Effect”: Never use manual Add Force or Add Torque on the pelvis in the Event Tick. Let the Physical Animation Component handle the balance via the Pose Snapshot.
· The “Carousel / Twisted Bones”: In your Physics Asset, disable collisions between neighboring bones (thigh-shin). Add Hinge limits to knees and elbows, and lock the Twist axis.
· Jitter: Ensure Is Local Simulation is checked in your Physical Animation settings, and set Orientation Strength to around 1500-2000.
This combination gives you the best of both worlds: perfect procedural foot placement and the heavy, realistic physical reaction of an active ragdoll.
Has anyone else tried a similar pipeline? How do you handle getting up from the ground after being knocked down?