The values for tangent handles seem really arbitrary.
The docs say that the values "Control the absolute velocity at a key using the In/Out values"
So I checked a linear key at (24,1) at 24 fps in generic units. That's 1 unit movement over 1 second. It seems logical that the tangent value would be 1.
But we get 0.005. Why???? Is there some scale factor of 1/200 just built in?
for mxs this is the code i use for a bezier xyz position controller, hope it helps
fn GetOutY key next = ( len = key.outTangentLength ; if key.constantvelocity then len = [0.33333333,0.33333333,0.33333333]; key.value + key.outTangent * len * ((next.time - key.time) as float) / (framerate); ) fn GetInY key prev = ( len = key.inTangentLength; if prev.constantvelocity then len = [0.33333333,0.33333333,0.33333333]; key.value + key.inTangent * len * ((key.time - prev.time) as float ) / (framerate); )
TangentLength (in or out) is always the proportion of the time between frames so x = TangentLength * "numberofframesbetweenkeys"
from the mxs help....
.inTangentLength and .outTangentLength, (typically a fraction from 0 to 1) represent how long the handle is towards the adjacent key. For example, a value of 0.5 means the handle reaches halfway from the current key to the adjacent key, and a value of 1 reaches all the way. If the handle reaches beyond the adjacent key, it will be greater than one. If there is no previous key, the value of .inTangentLength will be -1.
Oops, I apologize, you are correct. The Y value was the problematic one. I was a bit distracted when I looked at that and got the values mixed in my head. Especially because that code was stupidly straightforward, I thought it was the X.
Thanks, it is exactly what I was looking for.