You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(nav): a graph rebuild snaps a mid-segment walker to its destination #60
When the movement graph is rebuilt while an entity is partway along a segment, the entity jumps straight to its destination node in a single frame. It still arrives, so a test that only checks arrival won't catch it.
Found by @alexandrecalvao while reviewing #59 (2026-10-12):
On a diagonal MovementLink: adding an unrelated movement node while an actor was walking down the link made it jump about 26 px to the destination, in a frame where dt was about 0.0032 s.
A graph rebuild clears the live routes and then restores the saved Navigating orders. navigate resolves the actor's current position to the nearest node. If that nearest node is also the destination, the from_node == to_node branch puts the actor straight onto it (src/nav/controller.zig, lines 550–569).
Expected
Rebuilding the graph should keep the in-flight segment and the actor's progress along it, or work them out again. An actor midway along a segment shouldn't be moved straight onto the destination node.
Why it matters
Flying Platform's opening cinematic walks the arriving crew down a diagonal link (flying-platform-labelle#1031). Any node that spawns or despawns during that walk causes a visible jump.
Activity
fix(nav): keep a re-issued last leg graph-tracked across rebuilds
fix(nav): a second rebuild before the re-issue keeps the waypoint hints