public sealed class FootPlacementPresetFoot 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 PelvisThe joint that is lowered to give the legs slack.
public Symbol LabelWhat the goals are called.
public float MaxHipDropHow far the hips may be lowered, in metres.
public float AnkleWeightHow much of the way to the surface's normal the ankle rolls, in [0, 1].
public float WeightHow much of the placement to apply at all, in [0, 1].
public float HipDropHow far the hips were lowered on the last update. Zero or negative.
Methods (2)
public FootPlacementPreset(ConstraintStack stack, int pelvis, IEnumerable<FootChain> feet, Symbol label = default(Symbol))Adds foot goals to a stack.
public float Update(Span<BoneTransform> local, Span<BoneTransform> model, ReadOnlySpan<GroundContact> contacts)Sets this frame's contacts and lowers the hips.
Used by (1)
- ConstraintTestsVixen.Animation.Tests