Walk a villager along a road of waypoints with rounded corners
Characters that march to a corner, stop turning on the spot and march on look like toys. This shows how to cut each corner into a gentle curve that never swallows a short stretch of road, so the walker flows from one waypoint to the next.
Why this works
People read a walker's turn as intent. A sharp corner says the figure was told to stop and face a new way, while a gentle bend says it is going somewhere. Cutting each corner only partway keeps the bend from eating the road next to it.
When not to use it
Skip it when the walker must touch every marked point exactly, such as a guard who has to stand on each tile, or on a grid where movement is by whole squares. There, keep straight steps and turn on the spot.
In the full entry
- What to build, step by step
- Starting values and the reason for each
- 4 common mistakes and the fix
- 42 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 "Walk a villager along a road of waypoints with rounded corners" (read_entry rounded-road-corners-for-a-walking-npc) 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