So I have set up a 3D navigation system where a small group of NPCs wander around a space using a Navmesh. NPCs are NavigationAgents, the player has a NavigationObstacle (now working, thank you 3.5.2). Pathfinding works, and avoidance works well, as long as NPCs are moving. However, as soon as an NPC finishes navigation and becomes static, he gets ignored by all other agent's avoidance, and they get stuck.
I tried to come up with a workaround:

  • When an NPC finishes navigation, a disabled collision shape on them is enabled
  • Navmesh is re-baked for the new collision shape to punch a "hole" in it
  • Pathfinding updated, other agents are now avoiding static NPC, due to being outside Navmesh
  • When NPC is set to start wandering again, the collision shape is disabled again, Navmesh re-baked and the "hole" fixed

It "works" but as you can imagine, it's pretty janky and not very efficient.

Anyone got any ideas as to how better deal with a situation like this?

23 days later

I think I answered this on Discord so I will copy it just in in case someone spots this issue with the search:

An agent that is not moving is not "ignored" in avoidance but without a moving "velocity" the prediction from other agents for this agent falls down to just the radius. The main problem in Godot 3.5 is that the avoidance is reset every frame so as soon as you have a situation that is cramped with some non-moving parts it is easy to get agents stuck cause they might move left one frame just to move right the next frame and left on the next, there is no consistency in movement.