Trying to solve why seeker doesn’t use shortest path when getting out of impassable Nodes.
Dynamically using tagMask to set which nodes are impassable.
Seeker happens to be inside of impassable nodes.
Calculate path to next destination.
Picks a node that is outside of impassable. Random as far as I’ve seen.
Seeker runs to the node without visiting any of surrounding Nodes.
It calculates the red route.
I think it should be the black route.
The pathfinding works on walkable nodes only. If it finds itself inside a wall, it will try to get out of it as quickly as possible, i.e it will pick the closest walkable node to its current position and move towards it.
Why do you have an agent on unwalkable nodes?
There is other problems. It avoids the nodes and jumps out so it doesn’t execute the code for visiting a Node.
To work around the problem.
I use my AutoPilot that gets feed a destination and has ReachedWaypoint and ReachedDestination events.
Use the tagMask that everything is walkable.
Let it calc a path which is correct.
Listen for waypoints and check that outside of structure.
Change tagMask back to original.