NavMeshAgents pushing each other

I’m working on a multiplayer RTS, but I’m having trouble with the pathfinding of units. I’m using the standard Unity built in NavMeshAgents, but when I give the units orders to move to a destination, they will clump up and push each other around. As seen in this gif:

I know why they are rotating like mad, but I can’t find anyway to stop them from pushing each other without using the Obstacle Avoidance Priority system, which doesn’t work very well. It would be fine if the unit just stopped, if there was another unit in the way of the destination, since they don’t always try to face the destination, I can’t just use a simple forward raycast to detect a unit infront.

Any ideas on how to fix it? I’ve looked on the asset store to find other path finding system. Either they are worse, don’t work or quite expensive for my taste. Thanks for reading.

Edit: I have looked at other Unity Answers posts, but I haven’t found a solution that works.

When you set the destination of a unit , make them calculate the distance between each other , and set the destination + offset from each other so they stop in a different position,

Hey @Dennisb1997 I’m having this same problem, is there a built in function for the Navmeshagents to calculate the distance between all the other agents within a certain area? I can’t think of any way to do that except maybe shooting a bunch of rays out in a 360 degree sweep, checking if it hits any colliders, then checking if their distance from those colliders is less than a certain number. Seems like a lot for every unit to be doing every update, not to mention hard to implement and easily breakable.