I searched a long time for a solution to this problem, I never found a good one You never have a once for all solution, but a lot of mixing, hacking and tunning.
a) Use local avoidance with a a cluster algorithm to generate a new big agent with size of all flocking agents. (I read it in a game AI book).
b) Use a pathfinding. You can have a grid where you update the weight when an agent is stationary and then generate a path. This was the solution that I use in “Dark Frontier” game.
I watch a video (i didn’t found anymore) that he create dynamically a grid aground the agent and cast all objects there when its needded.
If you have any more info, I will be very happy to know.
b) Use a pathfinding. You can have a grid where you update the weight when an agent is stationary and then generate a path.
I also considered it as an alternative. But I use navmesh graph. I am not sure what this solution will working in navmesh graph.
I will wait the Arong answer before realization.