I my game the whole map is generated afterwards. Only the character controller is in the scene. After the AI units spawn they get their path right, but when I block their path with obstacles(three different looking boxes on top right corner), which player can place during the gameplay, the AI will just force it’s path through any walls. It ignores all the walls when all the paths are blocked.
Try this. Before move your object - disable collider transform.collider.enabled =false;
After move enable transform.collider.enabled =true; And rescan graph AtsrarPath.active.Scan(); In my game work only so.
Use a GraphUpdateObject to update the location where the obstacles are.
I believe there’s an example scene that shows the graph update objects, and if my memory serves there’s a script in the package that uses them to update the graph (I think the door script?).
Anyways basically just set the walkable property of that node using the graph update object to unwalkable, then update the graph like that.
I’m not at home so I can’t give direct examples since my code isn’t in front of me, but I believe it was a fairly straightforward process.
In order to properly update the location you may want to grab your collider bounds and use that as the basis of what to mark as unwalkable with this approach.