Spielerando

Make the steps follow the distance walked so feet do not skate or moonwalk

If a walk animation just runs on a timer, the feet slide over the ground when the character speeds up, slows down, stops or walks backwards. Here is how to drive the stride by distance so each foot plants and stays put.

Why this works

A planted foot must slide back under the body exactly as fast as the body moves forward, or the eye sees skating. If the cycle advances by distance travelled instead of by time, that match holds at every speed, standing still and walking backwards included.

When not to use it

Wrong for movement that is not made by feet: sliding on ice, being pushed, riding or flying. There the legs should not follow distance. Also poor for turning on the spot, where nothing travels; use a separate turning step.

In the full entry

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

Say this to your AI

Use the Spielerando entry "Make the steps follow the distance walked so feet do not skate or moonwalk" (read_entry feet-match-the-ground-speed-of-a-walk-cycle) 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