
Hi,
the position keys are here : *CONTROL_BEZIER_POS_KEY 0 38.2311 0.0028 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0 *CONTROL_BEZIER_POS_KEY 4800 38.2311 0.0028 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0
they are given as bezier curves arcs. This is usefull because this will enable you to blend the keys more smoothly than with linear interpolation. Bezier arcs are defined by 4 control points but usually only the key points are saved (the begining and the end of the arc) and the tangents at the begining and the end of the arc. As the end point of the arc is the start point of the next arc, only one position is given in a key definition.
My first guess would be that the format is :
*CONTROL_BEZIER_POS_KEY 0
I don't know what the 0 in the end stands for.
to get the 4 control points of a bezier arc you would have t compute something like:
P0 = Key1.pos P1 = Key1.pos + Key1.tanIn P2 = Key2.pos + Key1.tanOut (could also be ) P3 = Key2.pos
with Key1 being the starting key and Key2 being the ending key.
and then perform a bezier interpolation to get the intermediate position between the keys. The snippet you gave would produce a linear motion as all the tangent are the null vector.
Note that scale are also defined with bezier curves and NOT as a matrix. First it is explicitely said and then the matrix would look weird as a a scale matrix has some nonzero values only on the diagonal.
for more info on Bezier interpolation see : http://astronomy.swin.edu.au/~pbourke/curves/bezier/
I hope this helps you.
Phil
