Animation · function

retargetPose

Write source, played on from, onto to in out. Allocates nothing.

Explained in Animation.

function retargetPose(map: RetargetMap, from: Skeleton, source: Pose, to: Skeleton, out: Pose): void
import { retargetPose } from '@driftengine/animation';

Parameters

ParameterTypeDescription
mapRetargetMap
fromSkeleton
sourcePose
toSkeleton
outPose

In depth

A joint the target has and the source does not is left exactly as it was found, so a character with a tail wearing a clip from one without keeps its tail wherever its own idle put it rather than snapping to rest. That is the layering sampleClip provides one level down, and it is what lets a retargeted clip be laid over a base pose.