Vixen
02b45cc4
csharp
public abstract class ConstraintGoal

What a constraint asks the pose to do.

Read the guide page for this →

Remarks

A class rather than a struct, and mutable in exactly one place. A goal is created once, lives for as long as the thing that wants it, and is read every frame — so the identity matters, and the only field a frame may change is Weight, which is what a handle exposes.

Everything a clip tag can express, a goal added from game code can express, and they arbitrate together with no special case.

⚠ There is no residual on a goal, and that is not an omission. A goal reached through a clip's track is one object shared by every character playing that clip, so a per-goal error field would have a hundred writers and one value. Residuals belong to the instance: Residual for a goal a game added, and Residual for one a clip carries.

Fields and properties (16)

  • public abstract GoalKind Kind

    What it asks for.

  • public required int Effector

    The joint it is about.

  • public IConstraintFrame? Goal

    Where the goal is, or for a goal that needs no frame.

  • public ChainSpec Chain

    Which joints may move to satisfy it.

  • public ChainSpec Solved

    The chain as the solver sees it, with the effector filled in when nobody said.

  • public GoalMode Mode

    Whether it says where to be, or how far to move.

  • public IConstraintFrame? Reference

    Where an additive offset was measured against, or for the live pose.

  • public int Priority

    How much it matters relative to others on the same chain.

  • public Symbol Label

    What other systems know it as, for querying and suppression.

  • public LodRange Lods

    Which detail levels it is worth solving at.

  • public float MaxWeight

    The most of it that is ever applied, in [0, 1].

  • public float EaseIn

    How long it takes to fade in once it resolves, in seconds.

  • public float EaseOut

    How long it takes to fade out once it stops resolving, in seconds.

  • public float Weight

    How much of it is wanted, in [0, 1]. The one field a frame may change.

  • public float Phase

    Where in its clip it is, for a goal that moves.

  • public Vector3 Pole

    Where the pole for a two-bone solve is, in model space. Zero keeps the current bend.

Methods (1)

  • public override string ToString()

    Returns a string that represents the current object.

Used by (28)

  • ConstraintStageBenchmarksVixen.Benchmarks.Animation
  • AimGoalVixen.Animation
  • AuthoringTestsVixen.Animation.Tests
  • CameraConstraintsVixen.Animation
  • ConstraintGizmosVixen.Animation
  • ConstraintHandleVixen.Animation
  • ConstraintStackVixen.Animation
  • ConstraintStageTestsVixen.Animation.Tests
  • ConstraintTagVixen.Animation
  • ConstraintTagRecordVixen.Animation
  • ConstraintTestsVixen.Animation.Tests
  • DefaultConstraintArbiterVixen.Animation
  • DistanceGoalVixen.Animation
  • EnumeratorVixen.Animation
  • FootPlacementPresetVixen.Animation
  • GizmoTestsVixen.Animation.Tests
  • JointLimitTestsVixen.Animation.Tests
  • OrientationGoalVixen.Animation
  • PlacementTestsVixen.Animation.Tests
  • PlaybackVixen.Animation
  • PositionGoalVixen.Animation
  • ProxyShapeTestsVixen.Animation.Tests
  • ResolvedGoalVixen.Animation
  • RigidBodySolverVixen.Animation
  • TrajectoryTestsVixen.Animation.Tests
  • VariationHarnessVixen.Animation
  • WeightedTestArbiterVixen.Animation.Tests
  • AnimationClipDocumentVixen.Editor.AssetEditors