This function can be used to change the transformation of a bone set with
TransformBone. This allows to create dynamic animations by script. Returns
true
if the new transformation was set or
false
if there is no such animation node or it was not created with
TransformBone.
See the
animation documentation for further explanations of the animation system.
The transformation passed to this function is not completely arbitrary, in particular it must not have components which skew the mesh along one of the axes. Skewing is not supported by the animation blending system. Skew matrices cannot be produced with one of the Trans_* functions directly, but it can result of the multiplication of a rotation matrix with a rotated scale matrix, e.g.
Trans_Mul(Trans_Rotate(...), Trans_Scale(...), Trans_Rotate(...))
. Skewing cannot occur by combining translation and rotation matrices only.
SetAnimationBoneTransform(animation_number, Trans_Rotate(FrameCounter() % 360, 0, 1, 0));
Script for a timer to be called each frame: The bone for which the animation with animation_number
was started is turning with one revolution per 360 frames.