Problem with ragdoll constraints.

So I am trying to make a few ragdolls based on military hardware. However, despite leaving the $jointconstrain values at 0, some of the pieces keep moving in axis they should not be allowed to move in.
How do I fix this?

Here’s the qc.

$modelname “gow/weapons/Locust_Troikaturret”
$scale 1.00
$cdmaterials “models/gow/weapons”

$body “Body” “locust_troikaturret.smd”

$Sequence “ragdoll” {
activity “ACT_DIERAGDOLL” 1
fadein 0.2
fadeout 0.2
fps 30

$surfaceprop “metal”

$collisionjoints “D:\Program Files (x86)\Steam\steamapps\common\Half-Life 2\ep2\models\gow\weapons\Locust_troikaturret.smd”
$mass 90
$inertia 10
$damping 0.01
$rotdamping 1.5
$rootbone “b_troika_root”

$jointconstrain "b_troika_gun_latitude" x limit -0 0 0
$jointconstrain "b_troika_gun_latitude" y limit -0 0 0
$jointconstrain "b_troika_gun_latitude" z limit -360 360 0

$jointconstrain "b_troika_gun_longitude" x limit -25 25 0
$jointconstrain "b_troika_gun_longitude" y limit -0 0 0
$jointconstrain "b_troika_gun_longitude" z limit -0 0 0

$jointconstrain "b_troika_spinner_R" x limit -0 0 0
$jointconstrain "b_troika_spinner_R" y limit -360 360 0
$jointconstrain "b_troika_spinner_R" z limit 0 0 0

$jointconstrain "b_troika_spinner_L" x limit -0 0 0
$jointconstrain "b_troika_spinner_L" y limit -360 360 0
$jointconstrain "b_troika_spinner_L" z limit 0 0 0


Please, does anyone know how to fix this? It is quite annoying to tell your model that a certain part only moves in a certain direction only for it to simply not listen.

Are you using hlmv to generate your jointconstrain ? If not, you should, is far easier.

That’s not the problem, I already have jointconstraints. It’s just that the model does not obey them.

Hm, I noticed that you are using limits of 360 (+/-) for your constrains but I guess you want it to be -180 to 180. Even HLMV won’t let you set -360 or +360 for constraint limits, the max/min values are respectively 180/-180.
That might bug your model, I don’t know, you could try different values to see if it will at least start obeying the limits you set.

Okay, I will try that.
There’s still the issue with pieces with 0 0 0 values still moving.

Doing a quick research while browsing : $jointconstrain - Valve Developer Community

I found out there are other options instead of just limited jointconstrain. Try also using “free” instead of “limit” if you want it to do free 360 movement

Movement in one axis isn’t the problem, the problem is making so that the axis set to 0 0 0 do not move.

that would be ‘fixed’ then.

Will try and see if it works.