SetPoseParameter clamp problem

I have a turret that I’m setting the pitch on (custom model) using a poseparameter, but whenever I try to clamp the input value to the maximum/minimum of the poseparameter, it goes back to the default 0 position.

For example (turret goes from -25 to 25 degrees):
Input: 22.20985094 (calculated from eyeangles)
Result: Turret goes to 22.20… degrees

Input: -3.2364346543
Result: Turret goes to -3.26… degrees

Input: -25
Result: Turret goes to 0 degrees

What’s happening here? And this happens even if I clamp to ± 24, so it’s not hitting the outer range or anything.
Prompt responses would be appreciated, I need to get this working by the end of the month.

Anyone?

math.Clamp( val, min, max )?

I am clamping it, and I know how to use clamp. The problem is that when I set a poseparameter it doesn’t always work. Most of the time it does, but it appears that some input values are invalid or something, and the pose goes to the default position.

It’s probably something simple like a typo or a wrongly defined variable, really annoying problems are like 90% simple fixes.

Just trying to help, don’t flame. :frown: