Spielerando

Make a standing soldier turn by stepping its feet once the upper body has twisted too far

Units that stand guard and keep looking at enemies either slide round on the spot like a turntable or twist their spine like a corkscrew. Real bodies do neither. This entry splits the body into two parts and says when the feet should take a step and how big it should be.

Why this works

A real body cannot twist without limit, and planted feet do not slide. So the upper body turns freely, and only when the twist gets uncomfortable do the feet take a step to catch up. The steps are what make the turn look believable.

When not to use it

Too much for small or distant figures, a top-down view with tiny sprites, or a game with only a few turn pictures. Nobody sees the footwork, so turn the whole body at once and save the effort for the main character.

In the full entry

  • What to build, step by step
  • Starting values and the reason for each
  • 4 common mistakes and the fix
  • A diagram of every state
  • 37 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 a standing soldier turn by stepping its feet once the upper body has twisted too far" (read_entry soldier-turns-feet-in-steps-when-the-torso-twists-too-far) 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