I have two variables:
varOne = Mathf.Clamp(progress,0,100)
varTwo = Mathf.Clamp(progress,30,40)
Both with completely different Mathf.Clamp values, but both with the control variable of "Progress". I want progress to be "clamped" between 0 & 100 and to control both my variables (like a percentage).
For example if Progress = 50 then varOne = 50 and varTwo = 35 both variables will be at 50%
Thanks but I'm failing to see how this helps, It works almost the same as my Mathf.Clamp, how can I keep the values between "30,40" but use a controlling value with a range of 0 to 100?
– CaiuseSorry I think I cracked it, I was using a float as the controlling var, so It appeared to be working the same, realised I needed to change the controlling var to a int.
– CaiuseStrangely that only works as a float 0.0 - 1.0, but none the less it'll do. Cheers
– CaiuseOr you could change all vars to floats
– MortennobelLerp only interpolates between 0.0 and 1.0 (that's why I divide by 100) in the code example above
– Mortennobel