Is it possible to use one navmesh to navigate two navmeshagent groups so that they only colide with navmeshagents from same group?
Hey!
I haven’t tested this, so I might be mistaken, but pathfinding with NavmeshAgents doesn’t work the same way as physics: there aren’t layers that can ignore each other, all the agents just use the same navmesh system.
Maybe disabling first all the agents for one group (so that they don’t count in the pathfinding), calculating a path, then disabling the first group and enabling the second, and when all have their paths enabling all could solve it.
A possible problem that might arise from this is that they still collide even though they have paths that ignore each other. So a possibility is that you let them calculate their path, but then don’t update using the navmeshagent, but ask them what their next desired position is, and just set it in their transform. It is hacky, but it might be your best solution.
Also, take a look at the experimental NavmeshComponents project, you can query a navmesh for different agent sizes with that, so maybe that could help?
Anyway, good luck!