Animation · function
stripRootMotion
Pin a sampled pose's root to the value the clip authored at time zero.
Explained in Animation.
function stripRootMotion(clip: AnimationClip, rootJoint: number, pose: Pose): voidimport { stripRootMotion } from '@driftengine/animation';Parameters
| Parameter | Type | Description |
|---|---|---|
clip | AnimationClip | |
rootJoint | number | |
pose | Pose |
In depth
The other half of the capability: whatever extractRootMotion handed the caller has to leave the
pose, or the character moves twice. Pinned to the clip's own first value rather than to the rest
pose, so a root authored a metre off the origin keeps its offset — resting it would drop every
character to the floor of its rig on the first frame.
A joint that is not the root is left exactly as it was found, which is the same layering rule
sampleClip and retargetPose both keep.