Struct GaitPose

Namespace
CodeSmile.AnyMotion.AnimateYourself.Gait
/
Assembly
ApiSource.dll

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.

public struct GaitPose
Expand Details ...

Remarks

Units: metres and degrees, already scaled to this specific rig through RigMetrics. The portable, rig-independent unit is WalkGaitParameters, not this type. Denormalisation happens in exactly one place, CodeSmile.AnyMotion.AnimateYourself.Gait.WalkGait, so there is a single point to inspect when a preset does not carry over between rigs.

Positions are local to the character's own object: X is right, Y is up with 0 at the ground plane, Z is forward.

Which form each space reads: space A (Mecanim muscle) and space B (custom per-bone rotation frame) read LeftLeg, RightLeg, LeftArm, RightArm and the torso rotations; space C (body-normalised IK targets) reads LeftFoot, RightFoot, LeftHand, RightHand and the same torso rotations. Both forms come from one phase value and one parameter set, so a difference in result is attributable to the space and not to different timing.

Fields

Anchoring

L05 (foot planting on uneven ground): how a foot's IK target may follow ground the gait did not author. Copied from Anchoring so IkTargetSpaceDriver can gate its raycast on the pose alone.

public WalkGaitParameters.GroundGroup.ContactAnchoring Anchoring

Field Value

WalkGaitParameters.GroundGroup.ContactAnchoring

ArmElbowPoleAngle

L11: ElbowPoleAngle, copied as-is — already in degrees from straight back towards this arm's own side.

public float ArmElbowPoleAngle

Field Value

float

ArmReachAcrossLimit

L11: ReachAcrossLimit, copied as-is — already in degrees, measured from straight forward towards the centre line.

public float ArmReachAcrossLimit

Field Value

float

ArmReachBehindLimit

L11: ReachBehindLimit, copied as-is — already in degrees, measured from straight forward, going outwards.

public float ArmReachBehindLimit

Field Value

float

ArmReachUpLimit

L11: ReachUpLimit, copied as-is — already in degrees, measured from hanging straight down.

public float ArmReachUpLimit

Field Value

float

ChestEuler

public Vector3 ChestEuler

Field Value

Vector3

GroundSmoothingSeconds

L05: SmoothingTime, copied as-is — already in seconds, nothing to denormalise. How long a foot's height correction and the pelvis drop take to catch up to a newly measured ground height instead of snapping there in one frame.

public float GroundSmoothingSeconds

Field Value

float

HandTargetWeight

L11 (arm layering): HandTargetWeight, copied as-is — already a 0..1 fraction. IkTargetSpaceDriver reads this to decide how much of a hand's reach comes from an externally assigned target (eg a carried object's grip point) instead of the gait's own swinging rotation — 0 (the default, and every existing preset) leaves the arm exactly as before this field had any consumer.

public float HandTargetWeight

Field Value

float

HeadEuler

public Vector3 HeadEuler

Field Value

Vector3

Hips

Where the Hips bone should sit and how it should be oriented.

public GaitPose.SegmentPose Hips

Field Value

GaitPose.SegmentPose

IdleWeight

0 while walking, 1 when fully idle (L04). Already folded into every field below by CodeSmile.AnyMotion.AnimateYourself.Gait.WalkGait's post-evaluation blend — a driver space that ignores this field still receives a pose blended toward standing, since the blend is applied here, not layered separately downstream.

public float IdleWeight

Field Value

float

LeftArm

public GaitPose.ArmAngles LeftArm

Field Value

GaitPose.ArmAngles

LeftFoot

public GaitPose.LimbTarget LeftFoot

Field Value

GaitPose.LimbTarget

LeftHand

L11 (arm layering), arm-swing-spec.md §2: the arm's authoritative IK target for space C — not a debug approximation. Unlike every other GaitPose.LimbTarget, Position and NeutralPosition here are offsets from the shoulder joint, expressed in root space, not root-local points — a hand hangs from the shoulder and must follow it wherever the pelvis bob, torso lean, spine twist and clavicle rotation put it, so anchoring in the character's root frame the way a planted foot does would fight the shoulder instead of following it.

public GaitPose.LimbTarget LeftHand

Field Value

GaitPose.LimbTarget

LeftLeg

public GaitPose.LegAngles LeftLeg

Field Value

GaitPose.LegAngles

LookAtChestWeight

public float LookAtChestWeight

Field Value

float

LookAtEasing

L01: Easing, copied as-is.

public bool LookAtEasing

Field Value

bool

LookAtHeadWeight

L01 (look-at / head tracking): HeadWeight/ NeckWeight/ ChestWeight, copied as-is — the split is computed from the sum of these three at the point they are applied, not here.

public float LookAtHeadWeight

Field Value

float

LookAtNeckWeight

public float LookAtNeckWeight

Field Value

float

LookAtPitchLimit

L01: PitchLimit, copied as-is — already in degrees.

public float LookAtPitchLimit

Field Value

float

LookAtTrackingSpeed

L01: TrackingSpeed, copied as-is — already in degrees per second.

public float LookAtTrackingSpeed

Field Value

float

LookAtYawLimit

L01: YawLimit, copied as-is — already in degrees.

public float LookAtYawLimit

Field Value

float

MaxUnsupportedFootDropMetres

L05: MaxUnsupportedFootDrop, denormalised to metres for this rig. The no-ground policy clamps a foot's downward correction to this distance instead of reaching for a distant or missing surface.

public float MaxUnsupportedFootDropMetres

Field Value

float

Phase

Position of the gait cycle, 0..1. One cycle is two steps.

public float Phase

Field Value

float

RightArm

public GaitPose.ArmAngles RightArm

Field Value

GaitPose.ArmAngles

RightFoot

public GaitPose.LimbTarget RightFoot

Field Value

GaitPose.LimbTarget

RightHand

L11: same as LeftHand, for the right hand.

public GaitPose.LimbTarget RightHand

Field Value

GaitPose.LimbTarget

RightLeg

public GaitPose.LegAngles RightLeg

Field Value

GaitPose.LegAngles

ShoulderGirdleEuler

public Vector3 ShoulderGirdleEuler

Field Value

Vector3

SlopePelvisTiltAmount

L08 (slope adaptation): PelvisTiltAmount, copied as-is — already a 0..1 fraction, nothing to denormalise.

public float SlopePelvisTiltAmount

Field Value

float

SlopeStepShortenRatio

L08: StepShortenRatio, copied as-is — already a 0..1 fraction, nothing to denormalise.

public float SlopeStepShortenRatio

Field Value

float

SoftReachStart

O4 (knee pop): SoftReachStart, copied as-is — already a 0..1 fraction of a limb's full reach. Shared by legs and arms, since both solve through the same two-bone IK.

public float SoftReachStart

Field Value

float

SpineEuler

Rotation offsets for the torso and head chain, in degrees, relative to the bind pose.

public Vector3 SpineEuler

Field Value

Vector3

StepLengthMetres

Ground distance one step covers this frame, in metres.

public float StepLengthMetres

Field Value

float

StepsPerSecond

Cadence actually used this frame, in steps per second.

public float StepsPerSecond

Field Value

float