Preventing entities from overclustering

I’ve got a player with a group of AIs after it. Problem is when the player moves they all follow the same path and clip into each other. Would physics collision help fix this?

Are you using the CrowdManager and CrowdAgents ? Don’t use physics, it will mess things up even more. Can you show some code ?

I experimented with physics and so far nothing exploded. I am using FindPath() for each character. Are CrowdManagers more efficient/better for moving targets?

CrowdManagers are meant to be used for groups of entities. Sample 39 demonstrates their use.

Alternatively you could apply the basic rules of swarm behaviour to your AI:

  • Move in the same direction as their neighbours
  • Remain close to their neighbours
  • Avoid collisions with their neighbours

Casting spheres could help with determining which neighbours each AI should “pay attention to”.

1 Like

I used a simple capsule for my NPC’s. They use a crowd-manger just fine. You do have to be careful with the physics though. It causes strange behavior.

Also I believe their is a limitation to using a crowd manger, for example the agents can only go to one position or track only one position ieg: track the players position.