| name | retreat |
| description | Retreats steadily backward while facing the threat, via a translating sequence that moves root backward. Use when a command mentions retreat, withdraw, fall back, give ground, or back off while staying faced toward danger. |
| category | locomotion |
| disable-model-invocation | true |
| subskills | ["walk","balance-and-posture"] |
retreat
A wary backward withdrawal that keeps you facing forward. Translate root while OMITTING faceDeg so the heading holds.
Composes: walk + balance-and-posture
How
- Use a
sequence with loop:false. Frame root is ABSOLUTE; compute the travel axis from state.position+state.faceDeg (0=+Z, 90=+X). The example assumes origin facing +Z. Make z more negative; do NOT set faceDeg.
- Alternate careful backward steps (knee lift then plant), stay upright and wary.
durationMs ~2400.
Example
- "retreat slowly" ->
{"durationMs":2400,"say":"Backing away slowly.","sequence":{"loop":false,"frames":[{"t":0,"pose":{"LeftUpLeg":[30,0,0],"LeftLeg":[20,0,0]},"root":{"z":-0.6}},{"t":0.5,"pose":{"LeftUpLeg":[0,0,180],"LeftLeg":[0,0,0],"RightUpLeg":[30,0,0],"RightLeg":[20,0,0]},"root":{"z":-1.2}},{"t":1,"pose":{"RightUpLeg":[0,0,180],"RightLeg":[0,0,0]},"root":{"z":-1.8}}]}}
Limits & posture
Keep ≥1 foot grounded except at a jump's airborne apex; stay inside human joint ranges and keep weight over the support — see balance-and-posture.