thanks for the reply Storm102, i had already considered that as an apporach but just doesn’t seem to be a great solution as you point out, must be some neat solution to this issue.
If every agent is walking to the same position avoidance will not work anymore especially if every agent has the same avoidance priority set. Where should they go? They wan’t to reach one position and push each other around.
So instead of walking to target.position take the whole group, calculate the center, take each agent offset and let them walk to target.position + offset. If you have agents which are more important to reach a certain position, set your avoidance priority accordingly. Play with the different avoidance parameters to get your desired results.
Adding a NavMeshObstacle will only work if the NavMeshAgent is disabled compeletly otherwise the agent will behave in a weird way. If an agent reached a certain position you could switch the agent off and activate the obstalce. Nonethless it is far from an optimal solution, as the agent is not able to move unless you switch the obstacle off again.
Your idea was perfect When an enemy is collidering with the player I made it stop and enable an obstacle while this is active the other enemies no longer not push each other. Thank you