Download

Possibly to "tether" a ragdoll's bone/socket to a location?

When a player dies, their skeletal mesh is set to go ragdoll. In a multiplayer environment, the physics calculation of how that ragdoll falls is done client-side. So client 1 might see the ragdoll splayed out and client 2 might see them curled into a ball. Client 3 might have them fall slightly to the left and slide down a cliff.

So that issue with Client 3 is what I’m looking to tackle. I want these bodies to be lootable so I can’t have the corpses ending up in different locations for every player. It’s fine if they see the corpse in different poses as long as they’re pretty much in the same spot.

My thought was if I could lock the pelvis bone on the Z axis (so it could only fall down to the ground and wouldn’t slide down a hill), this would solve my problem. But I don’t see any way to handle that. Are there any other potential solutions to this out there?

I think I found a way to handle this. I kinda guessed at the parameters but it seems to work. I created a second actor to be the corpse with a ragdoll skeletal mesh, then added a Physics Constraint component to it, setting the Component Name 1 to be the skeletal mesh, then set Z motion to be free and X and Y are locked.

To test it, I added an impulse to the corpse and confirmed it wouldn’t move along the X and Y, only Z.