Spielerando

Let a walking unit finish its current step when it stops, instead of freezing mid-stride

When a march order is cancelled the legs stop wherever they happen to be, and a whole army stands there with one foot in the air. The obvious cure, playing the walk backwards or snapping to the idle pose, looks worse. This entry says where the feet should come to rest and what to do when the speed has already dropped to zero.

Why this works

A person stands still only when both feet are down, so a stop is believable only at that moment. Letting the stride run on to the next such moment hides the cut, and the idle pose then starts from a stable place instead of a half-lifted leg.

When not to use it

Wrong when a stop must be instant: a unit hit by a stun, caught in a net or turned to stone should freeze at once. The same goes for fast games where the delay would feel like lag. Cut straight to the stop pose.

In the full entry

  • What to build, step by step
  • Starting values and the reason for each
  • 3 common mistakes and the fix
  • 20 lines of example code with 5 checks that pass
  • How your AI shows you that it works

Say this to your AI

Use the Spielerando entry "Let a walking unit finish its current step when it stops, instead of freezing mid-stride" (read_entry stopping-unit-finishes-its-step-instead-of-freezing-mid-air) in my game. Build it step by step, and show me how you checked that it works.

Or skip this and connect the MCP: your AI then finds all of this by itself.Connect the MCP