How do I attach ragdolls to other objects?
I'm trying to make ragdolls attach to posts in the Source Hammer Editor for Half-Life 2. The outcome would be something like what is in the Sandtraps chapter, with the Combine guard used as a dummy:
This is the best I could find without going in-game. Image source:
I did some research a while ago, but what I tried (which I do not remember what it was) did not work. The problem I am facing at the moment is how to actually attach the ragdoll to the post.
EDIT 1: I have tried using phys_ragdollmagnet
, but to no avail. I have also tried sticking a prop through the ragdoll and into the post, but that doesn't work either.
EDIT 2: I have figured out how to attach objects using phys_ragdollconstraint
and phys_constraintsystem
. Now the problem is, I can't get them to stop dancing! They keep jiggling even though I have disabled the collisions on the ragdolls.
To attach a ragdoll to another object, you need two entities: a prop_ragdoll, and a phys_ragdollconstraint. The latter gives you the additional opportunity to attach the ragdoll to another nameable entity (used in cases where the ragdoll's parent is moving or can be moved, I presume), but this is optional.
Place the ragdoll (and its parent), and position the phys_ragdollconstraint as the point where the ragdoll is hanging from, like an imaginary nail.
Give the prop_ragdoll a unique name.
Go into the proporties of the phys_ragdollconstraint, and fill in the name of the ragdoll entity under 'Entity 1' (and that of the optional parenting entity under 'Entity 2').
- Compile, and enjoy the show in-game.