MotionWarp#
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 MotionWarpUsage 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);| Parameter | Description |
|---|---|
sourceEnd | Unwarped trajectory at endTime, not necessarily the clip end. |
target | Desired root pose at endTime, fixed for this action. |
maxTranslation | Maximum endpoint correction in meters, not total travel. |
maxYaw | Maximum heading correction in radians, from zero through PI. |
warpHeight | False preserves the supplied source height exactly. |
warpYaw | False 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; }Related types#
Source#
- MotionWarp.cs