I might be missing the obvious since this seems a bit strange of a behavior.
Let’s say we have 2 agents, Agent A and Agent B, and both have an Obstacle Avoidance radius of 0.5.
Agent B is not moving, and Agent A wants to move towards the TargetPos as illustrated below (blue is the navmesh, the red circles represent the Object Avoidance radius):
The problem is that Unity always Calculates the yellow path (the shortest possible to the TargetPos) completely ignoring the Agent B avoidance radius, and so, Agent A ends up stuck in the corner, unable to reach the TargetPos.
What I would like instead, is that when calculating a path, it takes into account Agent B Obstacle Avoidance cylinder and plans around it.
Is there a way to do it? Is it part of Unity’s NavMesh system?
NOTE: When Agent B is NOT in a corner, the obstacle avoidance works, and Agent A goes around him (even though the calculated path stays the same). It’s just in this situation, where going around means doing the LONGER distance, that he decides to go through the shortest path and gets stuck.
NOTE2: It’s not feasible to add a NavMesh Obstacle component to Agent B since that would mean that any other agents that wants to calculate a path towards him (or if he needs to calculate a path to anywhere) it would return as invalid! NavMesh Obstacle component only makes sense for non-agent objects.