Blend from ragdoll to standing

I’m currently attempting to get a ragdoll character to get back up blending into a standing animation.

Currently, to cause the ragdoll I take a character skeletal mesh component and call
This has the desired effect with the body detaching from the characters capsule component and correctly responding to physics.

However, I can’t seem to get the character to blend to a stand up again properly. Currently, I can get the character to immediatly return to a standing position by simply reattaching the mesh to the capsule component and adding the same initial relative location/rotation.

However, I want the character to first blend into an animation (standing up). I have the animation correctly playing however it won’t blend to the right orientation. eg if after physics the character is lying on its front, attaching the character to the capsule with a snap target will cause the character to keep the same pose but will change the location and direction to be the same orientation as the capsule.


If I attempt to just play the animation without attaching yet or just attach but retain the world location then the animation will play correctly but the character will finish standing in the wrong orientation (still lying on the floor but in the standing animation) as seen below.


I’ve tried following the epic tutorial on poses which is the method I used however their solution is to add extra physics bodies within the skeleton this causes problems when SetAllBodiesSimulatePhysics(false) is called which causes the mesh to teleport to random locations. The tutorial itself uses SetSimulatePhysics(false) when I use this and follow the tutorial everything worked fine in terms of the ragdoll getting up however SetSimulatePhysics causes me issues when adding forces to the ragdoll mesh as it states the mesh isn’t simulating physics and it doesn’t respond correctly when I apply forces.

In the video, they mention it can be done by attaching the mesh to the capsule and then correctly orienting it (Animation Pose Snapshot | Live Training | Unreal Engine - YouTube) but I can’t find a smooth way to make it attach retaining its location and then stand up vertically.

The key to this is to have a kinematic rigid body on the root bone. You can use this to re-anchor the capsule. The free Advanced Locomotion Plugin has a good example.

Thanks for mentioning the plugin it seems to have a ton of info on animation blending and I wasn’t aware of it before!

After digging through, it seems it uses the same method I’ve tried, with the simulation method using (SetAllBodiesBelowSimulatePhysics). This works great until I try to apply any forces to the ragdolled body (AddImpulse etc) where nothing will happen and it will complain after that it has to have ‘Simulate physics enabled’ to add any forces.

The only way I can seem to get the ragdolled body to respect physics calls is with using SetAllBodiesSimulatePhysics however as I said above I can’t then get it to nicely blend back to a unragdolled state after.

This IS WHAT You are looking for

I used this to do this with my falling zombies of the edges