# Group path following

A path is defined as a list of positions for units to follow sequentially to navigate terrain. For example,

var Path = new List<Vector2> (){
new Vector2 (0,0),
new Vector2 (10,5),
new Vector2 (20,5)
};


Conceptually, how would a group of 10 clumped-up units navigate to each of the waypoints? When each unit checks its distance to the waypoint to decide whether or not to move on to the next waypoint, units may start running into each other, trying to occupy the same waypoint.

Are there any clearcut solutions for group path following or ideas for how to solve it?

• For many units you'd want use swarm pathfinding. If 10 is the maximum, you could path-find each unit separately and just add some collision avoidance. – BlueRaja - Danny Pflughoeft Oct 17 '17 at 1:19