A unit pushes against a wall forever because nothing tells it that it is stuck
Characters get wedged in corners, jitter on the spot, or circle a waypoint they never quite reach, and the game never notices. Here is a simple way to notice lack of real progress, even when the character keeps moving.
Why this works
Movement is not progress. A unit that jitters or circles is busy yet getting nowhere, so the honest question is whether it got closer to where it is going, judged over a patient stretch of time.
When not to use it
Skip it for units that really should wait, such as guards, or when the way leads away from the goal on purpose. Count progress along the route there, or switch the check off while waiting.
In the full entry
- What to build, step by step
- Starting values and the reason for each
- 3 common mistakes and the fix
- 34 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 "A unit pushes against a wall forever because nothing tells it that it is stuck" (read_entry detect-unit-stuck-and-give-up) 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