Class WalkGaitParameters
- Namespace
- CodeSmile.AnyMotion.AnimateYourself.Gait /
- Assembly
- ApiSource.dll
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.
[Serializable]
public sealed class WalkGaitParameters : IVersionedData
Remarks
Every length is a ratio, never metres, because the measured rigs differ in shape and not only in size: leg-length-to-height ranges from 0.187 to 0.458 and arm-to-leg from 0.629 to 1.127 across the P2 test set. A single scale factor cannot carry a preset between them, so each length is expressed against the body part it belongs to:
- fore/aft and vertical foot motion is in units of
LegChainLength; - lateral foot placement is in units of
HipWidth; - pelvis translation is in units of
HipJointHeightorHipWidth; - everything about the torso, arms and head is in degrees, which needs no normalisation.
Fields
Arms
[Tooltip("Arm swing and posture. Left Arm and Right Arm at the end of this section set how far each arm departs from that swing. How far a hand may reach for an assigned target is set in the IK Targeting section instead.")]
public WalkGaitParameters.ArmGroup Arms
Field Value
Asymmetry
[Tooltip("Makes one leg move differently from the other, which is what produces a limp or an injured gait. The hip and torso response follows on its own; it does not need tuning here.")]
public WalkGaitParameters.AsymmetryGroup Asymmetry
Field Value
ClipLayering
[Tooltip("Reserved for a planned mode in which an animation clip supplies the base pose and AnyMotion layers the upper body on top of it. None of it has any effect yet: the base pose is always this character's own rest pose, which is what Bind Pose below means.")]
public WalkGaitParameters.ClipLayeringGroup ClipLayering
Field Value
Footstep
[Tooltip("The shape of one step: how long, how high, how far apart the feet are, and how the foot is angled as it lands and pushes off. Left Leg and Right Leg at the end of this section set how far each leg departs from that shape, which is what produces a limp.")]
public WalkGaitParameters.FootstepGroup Footstep
Field Value
Ground
[Tooltip("How the feet follow ground that is not flat: stepping onto a kerb, up stairs, or over the edge of a drop.")]
public WalkGaitParameters.GroundGroup Ground
Field Value
Head
[Tooltip("How the head moves along with the walk: bob, turn, tilt, and how much it stays facing the way the character is going.")]
public WalkGaitParameters.HeadGroup Head
Field Value
Idle
[Tooltip("What the character does when it stops moving: how quickly it settles, and the breathing and shifting of weight that keep it from looking frozen.")]
public WalkGaitParameters.IdleGroup Idle
Field Value
Irregularity
[Tooltip("Random variation added on top of everything else, so the animation does not read as an exact repeat and so two characters with the same settings do not move in unison.")]
public WalkGaitParameters.IrregularityGroup Irregularity
Field Value
Knees
[Tooltip("Which way each knee points as the leg bends, which Pole Outward sets. How far the knee bends is not authored: it follows from where the foot is placed, so Step Length and Step Height under Legs are what change it.")]
public WalkGaitParameters.KneeGroup Knees
Field Value
LimbReach
[Tooltip("How an arm or a leg behaves as it approaches full extension. These settings apply to all four limbs, because the elbows are solved by the same two-bone IK as the knees.")]
public WalkGaitParameters.LimbReachGroup LimbReach
Field Value
LookAt
[Tooltip("How the body reaches towards an object a game assigns. This section turns the head, neck and chest towards the Look At Target, and it also holds how far each hand may reach for its own target, such as a carried object. Assign all three targets directly below this group.")]
public WalkGaitParameters.LookAtGroup LookAt
Field Value
Pelvis
[Tooltip("How the hips move and rotate through the cycle. This is the largest single influence on how much weight the character appears to have.")]
public WalkGaitParameters.PelvisGroup Pelvis
Field Value
RunBlend
[Tooltip("What changes as the character speeds up from a walk into a run. Only the handful of settings that genuinely differ are listed here; everything else is shared, so there is one place to change it rather than two that can drift apart.")]
public WalkGaitParameters.RunBlendGroup RunBlend
Field Value
Slope
[Tooltip("What the body does on a slope: how far the hips tilt to match it, and whether the stride shortens rather than the hips dropping.")]
public WalkGaitParameters.SlopeGroup Slope
Field Value
Timing
[Tooltip("How fast the character moves and how the two legs are timed against each other. The settings here decide whether it reads as a walk or a run.")]
public WalkGaitParameters.TimingGroup Timing
Field Value
Torso
[Tooltip("Lean, side bend and twist of the spine, chest and shoulders.")]
public WalkGaitParameters.TorsoGroup Torso
Field Value
Version
[Tooltip("Format version of this settings set, written into saved presets so that a preset made with an older version of AnyMotion can still be read. Do not change it by hand.")]
public int Version
Field Value
- int
Methods
Blank()
A blank starting template: every field that produces visible motion is zeroed, leaving only
the structural gait-shape fields (Duty Factor, Step Width, Cadence and the like) at their
Neutral() value. Unlike Neutral(), which is an ordinary walk and
already carries a full set of amplitudes, this is meant as the least amount of motion a
working preset can have, for a user who wants to build a custom look by raising each
amplitude deliberately rather than by subtracting from an already-tuned walk.
StepLength/StepHeight are the one
exception: kept at 0.5/0.25 rather than 0, because StepLength is also the divisor in
stepsPerSecond = MoveSpeed / (StepLength × LegChainLength) — 0 there is a landmine the
moment a user raises Move Speed above its own blanked 0 without separately remembering to
raise Step Length too.
public static WalkGaitParameters Blank()
Returns
Cartoon()
Exaggerated, smooth, bouncy. Large amplitudes with low sharpness, so limbs travel far but never snap.
public static WalkGaitParameters Cartoon()
Returns
Horror()
Slow, uneven, high sharpness so joints arrive suddenly rather than easing. Forward hunch, dropped pelvis, arms held forward, asymmetric stride.
public static WalkGaitParameters Horror()
Returns
Limp()
One injured leg: a shorter, lower swing on one side. Everything else
stays neutral, so this demonstrates WalkGaitParameters.AsymmetryGroup on its own — the pelvis and
torso lean it produces come from WalkGait.Evaluate's existing leg-differential terms,
not from separate tuning here.
public static WalkGaitParameters Limp()
Returns
Neutral()
Neutral upright walk. The reference the other presets are judged against.
public static WalkGaitParameters Neutral()
Returns
Robot()
A mechanical/robot character: precise, correlated, unvarying motion. Irregularity and
asymmetry are left at their off-by-default values — for this class regularity is the
aesthetic, the opposite of Horror(), where irregularity is what sells an
injured, unpredictable gait. Reach-overflow behaviour (a leg or arm reaching farther than it
can extend) is not authored here at all: every driver space already clamps rather than
stretches (SolveTwoBone's reach clamp, IkTargetSpaceDriver's
ClampArmReachDistance) — there is no stretch behaviour in this codebase to turn off,
so a robot preset gets the required "clamp, never stretch" reach for free.
public static WalkGaitParameters Robot()
Returns
Run()
L02 (run): not a new pose, per locomotion-catalog.md's own note — Duty Factor below 0.5
is what produces the double-float flight phase GaitMath.FlightHeight arcs the pelvis
through instead of the walking Bob wave. Step Length up widens the thigh-swing amplitude too,
since ThighSwingDegrees already derives it from Step Length and duty — no separate
thigh-swing field is needed. Move Speed raised to match a running pace; DeriveCadenceFromSpeed
(on by default) then raises cadence to match, same as every other preset.
This one has no Inspector button, unlike Neutral(), Cartoon(), Horror(), Limp() and Robot(), which are the five buttons the preset row ships. Blank() has no button either: every Reset button writes it. Those five are motion styles; running is a speed, which the Movement section's own speed fields and WalkGaitParameters.RunBlendGroup already control. Kept as a callable parameter set because it is the one shipped configuration with a Duty Factor below 0.5, which is what several tests and doc comments use as their concrete example of the flight-phase case.
public static WalkGaitParameters Run()