Spielerando

Let a character look at things within reason, and relax when they are behind

A head that tracks the player gives life to a shopkeeper or guard, but a head that follows without limits twists like an owl, and one that clamps at the side suddenly snaps to the other side when the player walks behind. Here is a rule that handles every direction.

Why this works

People read a head turn as attention, but a real neck has a comfortable range and a limit. Following inside the range, straining at its edge and relaxing beyond it matches that, and moving at a capped speed makes every change look deliberate.

When not to use it

Skip it for characters that should look rigid or robotic, for top-down games where heads are tiny, and for anything the player must read exactly, such as a guard whose gaze is the detection cone. There the gaze must follow the real rule, not a polite one.

In the full entry

  • What to build, step by step
  • Starting values and the reason for each
  • 3 common mistakes and the fix
  • A diagram of every state
  • 26 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 "Let a character look at things within reason, and relax when they are behind" (read_entry head-follows-the-player-but-never-twists-backwards) 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