NavMeshAgent being Nav Mesh Obstacle at the same time

Hello,
Imagine a small road with 2 people crossing each other.
Both should walk to a certain point but at the same time not going through each other, using NavMesh systems.
So, how would I create a dynamic mesh where the agents do not collide with each other?

Edit: Also, imagine at this road there would be a car, this car is also a NavMeshAgent, but uses another layer of walkables. For the car, other cars and also people are an obstacle, and same goes vice versa. The cars should stop before they collide with people, while people should just find another route.

Do you have any idea on how to solve that problem? Or have any idea?
I guess this might also be far to calculative to work properly at all… Let’s say we have got 100 people and 50 cars.

According to the documentation, NavMeshAgent’s avoid each other using their Radius setting. It seems there is no NavMeshObstacle needed for just NavMeshAgent<>NavMeshAgent avoidance.

https://docs.unity3d.com/Manual/class-NavMeshAgent.html

Hmm yeah okay but they should also calculate their path according to others, not only avoid.

Avoidance is not just based on the agent size values but also the Obstacle Avoidance settings.

Obstacle Avoidance
Quality Obstacle avoidance quality. If you have high number of agents you can save CPU time by reducing the obstacle avoidance quality. Setting avoidance to none, will only resolve collision, but will not try to actively avoid other agents and obstacles.
Priority Agents of lower priority will be ignored by this agent when performing avoidance. The value should be in the range 0–99 where lower numbers indicate higher priority.

1 Like

The settings cannot fit my requirement: that all the agents can not push each others, but not if set the Obstacle Avoidance.

I’m in a similar position, were you able to find a solution?

here is the solution

Awesome, Thanks!