Vixen
02b45cc4
csharp
public sealed class FootPlacementPreset

Foot placement, expressed as constraints rather than as its own solver.

No guide page documents this yet — the page shows what the code says about itself.

Remarks

The same feet, through the stage. FootPlacement stays exactly as it is — a game that wants only feet should not have to meet any of this, and it is the cheaper path — but a game that has other constraints needs its feet arbitrating with them rather than fighting them from a separate pass. Two position goals with a region of the ground plane's tolerance, plus an orientation goal per foot, and one arbitration story instead of two.

⚠ The hip drop is not a goal, and that is the one real asymmetry. It is computed from the feet — the deepest shortfall over all of them — so it cannot be one participant among them; a goal that needed every other goal's answer before stating its own is not something a one-pass arbiter can host. It is applied here, before the goals are handed over, exactly as the standalone solver applies it before its two-bone solves. The staged solve that could express it properly is what IConstraintArbiter is for.

Ground contacts are supplied, not queried, for GroundContact's reason: a raycast is a physics-world question asked on the physics thread's terms.

Fields and properties (6)

  • public int Pelvis

    The joint that is lowered to give the legs slack.

  • public Symbol Label

    What the goals are called.

  • public float MaxHipDrop

    How far the hips may be lowered, in metres.

  • public float AnkleWeight

    How much of the way to the surface's normal the ankle rolls, in [0, 1].

  • public float Weight

    How much of the placement to apply at all, in [0, 1].

  • public float HipDrop

    How far the hips were lowered on the last update. Zero or negative.

Methods (2)

Used by (1)

  • ConstraintTestsVixen.Animation.Tests