Namespace CodeSmile.AnyMotion.AnimateYourself.Gait

Classes

WalkGaitParameters

The authored slider set for a walk. This is the portable, rig-independent unit: the same values should produce the same visible walk on a 1.28 m mouse and a 1.87 m Pumpkinhulk.

WalkGaitParameters.ArmGroup
WalkGaitParameters.AsymmetryGroup

L19 (limp / asymmetric gait): per-limb divergence, one block for each of the four limbs, applied in WalkGait.EvaluateLeg and WalkGait.EvaluateArm. Every multiplier is 1 by default, which is an even gait and the shipped behaviour. The pelvis and torso response (favouring the good leg, rolling onto it, winding up against it) is not authored here — it already falls out of WalkGait.Evaluate's existing leg-differential and weight-balance terms once the two legs' strides diverge, since those derive from leg state rather than from independent oscillators.

WalkGaitParameters.AsymmetryGroup.ArmDivergence

What one arm may do differently from the other. Read through GaitMath.ResolveArmMultipliers, never field by field, for the same reason WalkGaitParameters.AsymmetryGroup.LegDivergence is: WalkGait.EvaluateArm produces a hand IK target and a set of joint angles from the same numbers and the two must not disagree.

WalkGaitParameters.AsymmetryGroup.LegDivergence

What one leg may do differently from the other. Read through GaitMath.ResolveLegMultipliers, never field by field, so both output forms (foot position for space C, thigh and knee angles for spaces A and B) scale together.

WalkGaitParameters.ClipLayeringGroup

Reserved schema, no consumer. Nothing in this group is read by any code, and its defaults describe exactly what AnyMotion does today. It exists so that the upper-body clip-layering mode — an animation clip supplies the base pose, AnyMotion composes the upper body on top of it — can be added later without a preset-schema break. For the mode itself see Assets/Plan/future/redesign-decision-tree/02-fixed-pose-restore-point/pose-3-real-clip-escape-hatch.md; and locomotion-catalog.md §5 (what this list changes about the P7 schema freeze) for the reservation rule it follows: "an unused field costs nothing, a missing one costs a schema break". P7 (JSON preset schema freeze) is the deadline that makes the reservation worth making now rather than when the mode is built.

WalkGaitParameters.FootstepGroup
WalkGaitParameters.GroundGroup

L05 (foot planting on uneven ground): the authored half of vertical ground conformance. The raycast, height/normal correction and pelvis lowering are runtime behaviour in IkTargetSpaceDriver, not authored data, so they are not here — see roadmap.md §9 and locomotion-catalog.md §3.

WalkGaitParameters.HeadGroup
WalkGaitParameters.IdleGroup

L04 (idle): a post-evaluation blend of the walk pose toward standing-neutral, plus breathing and weight-shift added on top. See idle-motion-spec.md.

O12 (start/stop) splits that blend in two. LegParking hands the legs to CodeSmile.AnyMotion.AnimateYourself.Gait.WalkGait's decoupled leg cycles — each leg parks and unparks on its own, so a planted foot stays planted while the other leg finishes its step — and leaves the cross-fade owning only what has no leg phase to park: the pelvis, torso, head, arms and the breathing and weight-shift oscillators below. See CodeSmile.AnyMotion.AnimateYourself.Gait.WalkGait.ShouldParkLeg(bool, bool, float, float).

WalkGaitParameters.IrregularityGroup
WalkGaitParameters.KneeGroup
WalkGaitParameters.LimbReachGroup

O4 (knee pop): how any two-bone IK chain behaves as it approaches full extension. Read once per frame by WalkGait.Evaluate and GaitDriver.ApplyNow, then applied by IkTargetSpaceDriver.SolveTwoBone, which is the one function that solves all four limbs — so every setting here reaches both arms and both legs, and none of them is knee-specific.

WalkGaitParameters.LookAtGroup

L01 (look-at / head tracking): the authored half. Adds an additive rotation, in the character's frame, on top of whatever WalkGaitParameters.HeadGroup/WalkGaitParameters.TorsoGroup already produced for this frame — it does not override them. IkTargetSpaceDriver is where the live LookAtTarget Transform is read and turned into a yaw/pitch angle; nothing here needs a world position, so it stays portable like every other group.

WalkGaitParameters.PelvisGroup
WalkGaitParameters.RunBlendGroup

Walk/run speed blend: the "fully running" endpoint for the handful of fields that actually differ between walking and running (WalkGait.Run()'s own preset note). Ground, Slope, LookAt, Irregularity, Asymmetry and Knees are shared, read unchanged from the rest of WalkGaitParameters regardless of blend weight, so there is exactly one place to keep those in sync rather than two full duplicated presets that could drift apart on settings that have nothing to do with running. StanceFraction is the only accessor that already centralises Duty Factor for every reader (its own doc comment: "never from Parameters directly") — the blend piggybacks on that same accessor, plus equivalents for Step Length and Torso Lean; all four live on GaitContext, which is what carries the blend weight into the pose evaluation. DynamismMultiplier is different in kind from those three: rather than one more individually-overridden target field, it scales several existing Pelvis/Head/Arms amplitudes together, so "more dynamic running" does not need a new override field added here every time another amplitude turns out to want it too — see its own tooltip and GaitContext.EffectiveDynamism.

WalkGaitParameters.SlopeGroup

L08 (slope adaptation): the authored half. Extends L05 (foot planting on uneven ground) — the ground normals it tilts the pelvis towards and the reach deficit it draws step-shortening from both come from L05's existing raycast, so there is no separate authored slope input; only how much of that already-measured slope shows up in the pelvis and the stride is authored here. The raycast, blend and pelvis-rotation math are runtime behaviour in IkTargetSpaceDriver, not authored data, so they are not here — see roadmap.md §1a.

WalkGaitParameters.TimingGroup
WalkGaitParameters.TorsoGroup
WalkGaitPreset

A WalkGaitParameters preset, saved and loaded as a Unity asset.

Structs

GaitPose

One evaluated frame of gait, expressed in two forms at once so that all three candidate driver spaces of the P2 spike can consume the same source parameters.

GaitPose.ArmAngles

Rotational description of one arm, in degrees.

GaitPose.LegAngles

Rotational description of one leg, in degrees. Amplitudes are derived from the same normalised step length that produces Position, so the two forms describe the same intended motion.

GaitPose.LimbTarget

Target for one extremity, for the IK-target space.

GaitPose.SegmentPose

Position and rotation of a body segment.

Enums

WalkGaitParameters.ClipLayeringGroup.BasePoseSource

Which pose the driver spaces restore each frame, and therefore what the authored angles are composed against. Append-only, same rule as WalkGaitParameters.GroundGroup.ContactAnchoring: this is portable preset data, so reordering or deleting a member after presets exist in the wild would silently reinterpret them.

WalkGaitParameters.ClipLayeringGroup.ChannelBlendMode

How one channel's authored angles combine with the base pose. Unobservable while BasePose is BindPose, because the base is then the rest pose the angles are already measured from. Append-only, same rule as WalkGaitParameters.ClipLayeringGroup.BasePoseSource.

WalkGaitParameters.GroundGroup.ContactAnchoring

How a limb's target may move to follow ground it did not author. Reserved 2026-08-02 (roadmap.md §9) as insurance against a P7 schema break; World is unimplemented — declaring it now costs nothing, adding it after the freeze would. Append-only: never reorder or delete a member, serialization-format-decision.md §Migration strategy.

WalkGaitParameters.PelvisGroup.GravitySource

L02 (run): where FlightGravity comes from for the flight-phase pelvis arc (GaitMath.FlightHeight). Append-only, same rule as WalkGaitParameters.GroundGroup.ContactAnchoring: this is portable preset data, so reordering or deleting a member after presets exist in the wild would silently reinterpret them.