Im trying to make a game where you have to control many troops.
If all those troops get jammed in small place, its gonna look quite ugly right?
so im trying to make a pathfinding which keeps distance with other troop
as you can see in this video, those highlighed creature moves very neat and doesn’t overlaps each other. This is exactly what i want.
I think a good starting point is to check which units are most “on track”, the most on-track unit would be the one closest to the destination, the least off-course, and still able to move. Other units should try to follow that unit instead of pathfinding on their own. When they walk through a narrow corridor, one may successfully get in and become the most on-track, so the other units will just attempt to follow a nearby unit until they’ve all made it in.