Slide waypoint markers along a compass bar and keep them right at north
A strip compass with markers for your camp and the nearest cave is simple until you turn across north, when markers fly across the whole strip or vanish. Here is how to place them, fade them at the edges and pin the important ones.
Why this works
Directions live on a circle, where 350 and 10 are close neighbours. Measuring each marker as a small turn left or right of where you face, instead of as a raw number, keeps them still and sensible when you pass north.
When not to use it
Skip it when the world has no fixed north or the player cannot turn freely, such as a side-scroller or a top-down map. Show distance and direction with a flat arrow or a map pin instead.
In the full entry
- What to build, step by step
- Starting values and the reason for each
- 3 common mistakes and the fix
- 31 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 "Slide waypoint markers along a compass bar and keep them right at north" (read_entry compass-bar-markers-wrap-at-north) 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