I am making a game in P5JS (A framework of JavaScript) and I've run into a problem. I have enemies who are all circles as of right now and they are stacking since they go straight to the player. I need the enemies to not stack on top of each other, I have an X and Y for every character and here's a rough sketch of what I'm trying to accomplish.
The 2 orange dots are enemies and the blue dot is the player. I drew a blue and green line to show which way they are trying to go and since every enemy is gonna go different speeds, they would overlap and it wouldn't make much sense if they were on top of each other plus it's more difficult to play that way.
I need the outer enemy to go to where the purple dot is (rough estimate of the position). What math would you suggest I do?