How would my pawn go Ragdoll and then back to animations?

To turn to ragdoll, you just have to enable physics simulation.

// enable physics for all default bodies.
// if you have fixed bodies, you’ll have to call SetAllBodiesSimulate to unfix all of them

SkeletalMeshComponent::SetSimulatePhysics(true) 

// now wake up all rigid bodies.

SkeletalMeshComponent::WakeAllRigidBodies();

But also you have to disable Pawn’s movement/inputs so that they can’t move their mesh.

If you’d like to go back, you’ll have to do this in reverse.

You’d like to put sleep on rigid body, so it doesn’t move anymore.

SkeletalMeshComponent::PutAllRigidBodiesToSleep()

But also you’d like to disable Simulate, but enable blend so that you don’t simulate anymore, but you’d like to blend from physics position over time.

SkeletalMeshComponent::SetSimulatePhysics(false) 

You can call this function to set how much weight you’d like.

SkeletalMeshComponent::SetAllBodiesPhysicsBlendWeight

Ideally over time, you’d like physics weight to be 1->0 over duration of the time.

You can do all this in blueprint.

Thanks,

–Lina,