Skip to content

alignBone

alignBone(transform, bone, connect): void

Set bone transformation

Transformation is in the world coordinate frame. If bone has parent we find relative transformation to follow the skeleton hierarchy. Optionally scale of parent bone can be adjusted to connect head and reference (rest) position of parent’s tail (they have to be the same 3D point).

Parameters

transform: BoneTransform

Global bone’s position and rotation

bone: TransformNode

Reference to the bone instance

connect: boolean = true

Scale the parent to connect the bone

Returns

void