• Please make sure you are familiar with the forum rules. You can find them here: https://forums.tripwireinteractive.com/index.php?threads/forum-rules.2334636/

PC Pawn ragdolls can't be re-initialized

Marco

Grizzled Veteran
May 23, 2009
644
230
Finland
Category: Code

Reproducibility: Always

Summary: Once you set a pawn to go to ragdoll physics, but if you end it and go to walking, then re-enter ragdoll physics, it keeps the old ragdoll pose from before.

Description: I made a mod where player can go to ragdoll physics like being knocked out or feign death in UT3, this used to work all fine in pre-beta KF2 version, but now when you go to ragdoll physics the second time you just go back to previous physics location/pose.

If you need a simple sample mod of this I can make one.

Online/Offline: Both.

Video:
https://youtu.be/5Kg6nG9hyXw

EDIT:
Figured out if you use SetHasPhysicsAssetInstance false/true before you change physics mode, you reset the ragdoll, but still this shouldn't be neccessary:
Code:
		Mesh.SetHasPhysicsAssetInstance(false);
		Mesh.SetHasPhysicsAssetInstance(true);
		SetPhysics(PHYS_RigidBody);
 
Last edited: