Vixen
02b45cc4
csharp
public readonly record struct MotionContext

Everything 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 Parameters

    The values blend trees read.

  • public PoseScratch Scratch

    Where a blend gets its temporary poses.

  • public float NormalizedTime

    Where playback is, in [0, 1] across the motion's length.

  • public float PreviousNormalizedTime

    Where it was last frame, for events and root motion.

  • public int Loops

    How many whole passes were crossed since then.

  • public bool WantsRootMotion

    Whether the return value will be used.

  • public AnimationEventBuffer? Events

    Where events go, or to fire none.

  • public int Layer

    Which layer to attribute events to.

  • public string State

    Which state to attribute events to.

  • public float Weight

    How much this motion is contributing overall, for event filtering.

  • public ConstraintTagBuffer? Constraints

    Where a clip's live constraint tags go, or to report none.

Methods (1)

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