public readonly record struct ConstraintResidualHow far off a goal ended up, in the units its kind is measured in.
No guide page documents this yet — the page shows what the code says about itself.
Remarks
⚠ Public API, not a debug readout. Three things depend on it: the editor draws it while scrubbing, the governor that decides what a frame can afford uses it to rank what is worth solving, and the variation harness is nothing but a way of collecting it across many bodies. A goal that cannot report why it failed is a goal an author cannot fix.
Zero magnitude with Applied at zero is not success — it is a goal that never ran. Satisfied says so.
Fields and properties (7)
public GoalKind KindWhich kind of goal it came from.
public float MagnitudeHow far off. Metres for a position, radians for an orientation or an aim, signed metres for a distance, and for an additive goal the difference between the offset asked for and the offset applied.
public Vector3 VectorThe direction of the miss for a position goal, in model space. Zero for the other kinds.
public float AppliedHow much of the goal was applied at all, in [0, 1].
public static ConstraintResidual NoneA goal that has not been solved yet.
public bool SatisfiedWhether it ran and landed.
public bool RanWhether it ran at all.
Methods (4)
public ConstraintResidual(GoalKind Kind, float Magnitude, Vector3 Vector, float Applied)How far off a goal ended up, in the units its kind is measured in.
public static ConstraintResidual Of(Vector3 miss, float applied)A position miss.
public static ConstraintResidual Of(GoalKind kind, float radians, float applied)An angular miss.
public override string ToString()Returns the fully qualified type name of this instance.
Used by (12)
- ConstraintGizmoStyleVixen.Animation
- ConstraintGizmosVixen.Animation
- ConstraintHandleVixen.Animation
- ConstraintSolveContextVixen.Animation
- ConstraintStackVixen.Animation
- ConstraintTestsVixen.Animation.Tests
- DefaultConstraintArbiterVixen.Animation
- InstanceVixen.Animation
- JointLimitTestsVixen.Animation.Tests
- PlaybackVixen.Animation
- ProxyShapeTestsVixen.Animation.Tests
- VariationHarnessVixen.Animation