Unity Version: 2021.3.1f1
A* Pathfinding Version: 4.2.18 (non-beta)
Graph Type: Grid Graph
Problem: I am trying to use GraphUpdateScene to apply a non-traversable tag to mimic the effects of navmesh cutting. This works fine except that if a Seeker is within the non-traversable region, it will automatically inch out of the non-traversable region. (i.e trying to find the nearest non-traversable area)
For greater clarity - I’ve tested this without any custom movement script or AI destination setter on the Seeker object so I can confirm that it is the Seeker component trying to get out of the non-traversable region.
Solution I am looking for: Seeker stays stationary within the non-traversable region.
What I’ve tried:
- Setting AIPath’s “Recalculate path automatically” from ‘Dynamic’ to ‘Never’ → Does nothing
- Setting AIPath.canMove = false → It works until I need to Seeker to move again and when I set canMove = true, the Seeker just inches out of the non-traversable region again
- Changing Seeker’s tag to a high penalty and traversable = true → It works but non-traversable gives a more accurate pathfinding which is why I am looking for a solution without penalties.
- Create a GraphUpdateScene/GraphUpdateObject to reset the tags where the Seeker is standing so there is no overlap → It works but it will also cancel out non-traversable areas which have to be permenant (e.g traps). If I reapply the trap’s non-traversable area, I get the same inching problem again.