How do I get nav agents to not collide with each other?
I have 20 nav-agents and a bridge in my game scene.
Only one nav-mesh can be used for the nav-agents, and that nav-mesh is a flat plane. The 20 agents are split between Group A and Group B equally.
Assume the 10 agents from Group A go across the bridge while the 10 agents from Group B go below the bridge at the same time. How would we get the 10 NavAgent A's to not collide with the 10 NavAgent B's while maintain collision with the other agents of the same group?
From the possible solutions I've gathered, setting the nav-agent radius to 0.0001 or setting obstacle avoidance to None will solve this problem for 1 NavAgent A and 1 NavAgent B but not for 10 NavAgent A's and 10 NavAgent B's.
I'm struggling to understand what you need. It seems like if group B is under the bridge and A is on top they won't collide because they are not occupying the same space.
If I get what you're asking how to direct one group to the bottom and one over the top what you probably need is to set the destinations differently for each group.
https://docs.unity3d.com/ScriptReference/AI.NavMeshAgent-destination.html
Create empty transforms at the start of the bridge on for the top and the other side on the bottom. Then assign the destination for each group respectively. Then give them another destination on the other side of the bridge. This should direct each group individually.
If this isn't what you're asking give a little bit clearer detail on what you're trying to do and I'm sure there is a solution such as setting their collision matrix via layers not to collide. https://docs.unity3d.com/Manual/LayerBasedCollision.html