public readonly record struct MotionContextEverything a motion needs to know about the moment it is being evaluated at.
No guide page documents this yet — the page shows what the code says about itself.
Remarks
Time is normalised, not seconds. That is what makes a blend tree work: a walk of 1.2 s and a run of 0.8 s blended half and half have to put both feet down together, which they only do if both are sampled at the same fraction of their own cycle. The tree's own length is the weighted average of its children's, so a character speeding up from a walk to a run has its stride rate move continuously rather than jumping when the dominant clip changes.
Fields and properties (11)
public AnimationParameters ParametersThe values blend trees read.
public PoseScratch ScratchWhere a blend gets its temporary poses.
public float NormalizedTimeWhere playback is, in [0, 1] across the motion's length.
public float PreviousNormalizedTimeWhere it was last frame, for events and root motion.
public int LoopsHow many whole passes were crossed since then.
public bool WantsRootMotionWhether the return value will be used.
public AnimationEventBuffer? EventsWhere events go, or to fire none.
public int LayerWhich layer to attribute events to.
public string StateWhich state to attribute events to.
public float WeightHow much this motion is contributing overall, for event filtering.
public ConstraintTagBuffer? ConstraintsWhere a clip's live constraint tags go, or to report none.
Methods (1)
public MotionContext(AnimationParameters Parameters, PoseScratch Scratch, float NormalizedTime, float PreviousNormalizedTime, int Loops, bool WantsRootMotion, AnimationEventBuffer? Events, int Layer, string State, float Weight, ConstraintTagBuffer? Constraints = null)Everything a motion needs to know about the moment it is being evaluated at.
Used by (14)
- BlendEvaluatorVixen.Animation
- BlendTree1DVixen.Animation
- BlendTree2DVixen.Animation
- BlendTreeTestsVixen.Animation.Tests
- ClipMotionVixen.Animation
- MotionVixen.Animation
- MoveSetMotionVixen.Animation
- MoveSetTestsVixen.Animation.Tests
- MoveTransitionTestsVixen.Animation.Tests
- StateMachineInstanceVixen.Animation
- StillVixen.Net.Animation.Tests
- StillTestMotionVixen.Animation.Tests
- UnresolvedMotionVixen.Animation
- EmptyMotionVixen.Editor.AnimationGraph