Spawn Ragdoll?

Hello!

I’m an experienced Blueprint user, and I was wondering how I would go about a ragdoll death of a player. I would like to spawn another actor with a ragdoll mesh, and then destroy the player pawn, and ofcourse somewhere inbetween, spawn a spectator pawn and possessing it.

How would I go about spawning another actor with a Ragdoll mesh, while having all the same bone positions as the previous actor?

e.g. I have a ‘PlayerPawn’, with component ‘Mesh’. The Mesh component is currently running an animation of running. Then I trigger a function which spawns ‘RagdollActor’, with component ‘RagMesh’ with all arms and legs in the same positions as PlayerPawn, and destroys the previous actor, it order to make it look a little smoother.

Is it necessary to immediately destroy the existing pawn, or would it be acceptable to just cause the current player pawn to ragdoll and spawn/possess a spectator?

I can already do that, but I was just wondering if there was a way to spawn another actor instead, just to make it easier to manage corpses in the game

In that case I think SetMasterPoseComponent would be the best solution.
You could create a new mesh and have it copy the pose.
Set Master Pose Component | Unreal Engine Documentation

Ok I gave it a go, and now I can’t figure out how to ragdoll the newly spawned actor. It seems I might need to somehow remove the MasterPoseComponent which I previously set, after snapshotting the pose or something. How can I go about this?

Got it, instead of using MasterPoseComponent you can call SnapshotPose on the current players mesh and save it as a local variable in the corpse actor. You then have to pass it to an Animation Blueprint for the corpse mesh. After that you can simulate physics and it will start from the current pose.

Actor:

Anim BP:

Very nice! This Snapshot feature could be quite useful for other things too, I better take note of it! Thanks, appreciate it :slight_smile:

I know this is an old thread but this doesn’t work. After enabling physics the mesh always t-poses. Does anyone know a method to spawn a ragdoll with the same pose?