gait
Generate walking, trotting, or galloping cycles on rigs with foot IK targets and a body bone. Key planted stance, swing arc, toe roll, body bob, and sfx_step events.
Instructions
Key a gait on ANY rig that has foot IK targets and a body bone: planted stance, swing arc, toe roll, body bob and pitch coupled to the footfalls, and an sfx_step event (string = leg name) at every touch-down. Call with no project to list the gaits.
gait: walk (4-beat LH LF RH RF), trot (diagonals), pace (laterals), canter (3-beat), gallop (rotary, two
flights), bound (hind pair / fore pair) for 4 legs; tripod (L1 R2 L3 / R1 L2 R3) and wave for 6;
biped_walk / biped_run for 2 ("walk"/"run" resolve by leg count).
legs: the foot IK target bones, e.g. ["ik_front_L", "ik_front_R", "ik_hind_L", "ik_hind_R"]; side and end are
read from the name (_L/_R, front/hind/middle, LF, RH, L1..R3) or given as dicts
{"target", "side": "L|R", "end": "front|middle|hind", "name", "roll", "hip", "reach", "offset", "bias"}.
Hip, reach and the hock offset are found from the IK constraint that serves each target.
body: the bone that bobs and pitches (its children carry the hips/shoulders; the targets must NOT be under it).
speed: units/s (default: the gait's typical speed in leg lengths/s x the hip height). The cycle is in place;
the game scrolls the world at this speed. Frequency f = c sqrt(speed / leg_length), stride = speed / f,
so speed scales both by sqrt; if a stride would over-stretch a leg the frequency is raised (reported).
frequency / duty / clearance / bob / pitch / roll: overrides (0 or -1 = gait default; clearance and bob in units,
pitch and roll in degrees). exaggerate scales clearance, bob, pitch and roll. facing: 1 right, -1 left,
0 auto (front feet ahead of hind feet). Loops close exactly; keys go into animation name (default the
gait's name), at start, cycles strides long.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| bob | No | ||
| body | No | ||
| duty | No | ||
| gait | No | walk | |
| legs | No | ||
| name | No | ||
| roll | No | ||
| pitch | No | ||
| speed | No | ||
| start | No | ||
| cycles | No | ||
| events | No | ||
| facing | No | ||
| project | No | ||
| clearance | No | ||
| frequency | No | ||
| exaggerate | No | ||
| leg_length | No |