This function is very similar to
PlayAnimation. Instead of playing an animation which is pre-defined in the skeleton of the mesh, it allows individual bones to be transformed arbitrarily. The transformation is inserted as a leaf node into the animation tree for the given slot. The return value of this function is the animation number of the animation node inserted which can be used to manipulate or remove the animation later. If there are already animations in the given slot then additionally a combination node is created. This combination node is assigned the returned number plus 1.
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.
TransformBone("skeleton_arm_upper.R", Trans_Rotate(90, 0, 1, 0), 5, Anim_Const(1000));
Rotates the right arm of a Clonk by 90 degrees around the Y axis (in bone coordinates).