Plush

MotionWarp#

PlushEngine · Type index

Namespace: PlushEngine.Animation (using PlushEngine.Animation;)

A fixed-target, upright trajectory correction over an explicit time window in seconds. Source samples and the source endpoint must already be aligned to the same world frame. This evaluates requested motion only: it does not move an entity, solve collision, remove motion from a skeleton, or grant traversal eligibility. Feed differences between samples to a collision owner, and cancel when the solved path cannot follow. Recreate for a new action, not every tick.

public sealed class MotionWarp

Usage and examples

Members: EndTime · MotionWarp · Sample · StartTime

EndTime#

public float EndTime { get; }

MotionWarp#

public MotionWarp(float startTime, float endTime, MotionWarpPose sourceEnd, MotionWarpPose target, float maxTranslation, float maxYaw, bool warpHeight = false, bool warpYaw = true);
ParameterDescription
sourceEndUnwarped trajectory at endTime, not necessarily the clip end.
targetDesired root pose at endTime, fixed for this action.
maxTranslationMaximum endpoint correction in meters, not total travel.
maxYawMaximum heading correction in radians, from zero through PI.
warpHeightFalse preserves the supplied source height exactly.
warpYawFalse preserves the supplied source heading exactly.

Sample#

public MotionWarpPose Sample(float time, MotionWarpPose source);

Evaluate independently of frame rate and call order. Before the window the source is unchanged; after it the full correction remains, preserving continuity into the rest of the clip. Smooth endpoint correction preserves authored path variation; this is not IK or skew warping.

StartTime#

public float StartTime { get; }

MotionWarpPose

Source#