Hello! Recently, I have been building a game similar to the popular mobile game ‘crowd city’. The player has to gain as many NPCs as possible to follow them. Once they have a sizable amount of NPCs, they can command them to attack other players’ NPCs.
I have been struggling to find a good way to let NPCs follow a player. Many issues have arisen, due to there being a large number of NPCs.
I found a Youtube tutorial, I think it was this one that displayed a way for an NPC to follow a player. Unfortunately, this does not work well with many NPCs, and they collided with each other.
Removing collision solves this, though they then cluster together, which is undesirable.
Could anyone could suggest an effective way of allowing a large amount of NPCs to follow a player, whilst maintaining an organised formation and not causing much lag?
Note: I apologise if I haven’t given enough details, been vague or have not formatted this correctly, as this is my first time posting here. I am happy to attach more information if needed.