Ragdoll physics in water volume

In my game when enemies die, I call InitRagdol(), which changed the physics mode to PHYS_RigidBody.

When the are in a water volume, initially it looks cool and they sink to the bottom. However they then continue to spin endlessly and never settle down.

Does anyone know a way to slow them down to a stop? Any ideas are much appreciated.


It looks like there are two things you would need to do: Detect when the body hits ground and stop the movement.

I’d like to suggest an experiment: drop a dead body off a cliff and have it `log in event Landed to see if it detects hitting the ground. Do the same thing with a dead body in water. Also, in event Tick (possibly inside a relevant state?), log Pawn.FailedLandingCount. If Landed() gets called, or if FailedLandingCount starts going up, then you know that at least the pawn knows when it has reached the bottom, and you can insert code there to stop movement. If the pawn is not detecting via regular means that it has landed, then you may have to do a trace (not necessarily on every tick) to detect distance to the bottom.

Do you already know how to stop the movement? I don’t know for sure. Would it change anything if you increase the player’s mass? Is there a way to change the physics asset’s mass scaling or damping during gameplay? (Maybe not if they’re const.) When the player hits bottom, can you just set the physics to none? Do you have a lying-dead-on-the-ground animation that you can play? (Possibly with foot placement skeletal controls on bones besides the feet to keep the body flat on uneven ground.)

if the pawns never settle in ragdoll mode there is something wrong with your asset.
there will be overlapping of collision meshes or something. go into very fine detail in the phat editor, look at the collision hulls and tweak the joints until its perfect.

other than that, turn off the physics entirely once it hits the bottom

Thanks for the responses guys. @tegleg I do know what you mean regarding the physics asset not settling, but I don’t think this is the case here, as they work fine out of water.

I think increasing the MassScale might work. Will have to do some tests.