Animation · interface

RetargetMap

Playing one skeleton's clip on another.

Explained in Animation.

interface RetargetMap
import type { RetargetMap } from '@driftengine/animation';

In depth

Rotations transfer and translations do not, and that is the whole of it. Two rigs of different proportions share joint orientations and not bone lengths, so copying a translation puts the taller rig's limbs inside its own body. The root is the exception, because that is where locomotion lives — a walk whose root did not move would be a moonwalk.

What this does not do is retarget between different topologies: a rig with a split spine playing a clip from one with a single spine needs a decision about how to distribute the rotation, and that decision belongs to whoever knows what the character is. This matches by name, transfers what matches, and says what did not.

Properties

NameTypeDescription
indicesreadonlyInt16ArraySource joint index to target joint index, or -1 where the target has no such joint.
unmatchedreadonlyreadonly string[]Source joint names the target does not have, in source order.