0
Answered

Agents idle at Player's last position instead of Following

Crispy 5 months ago in Behavior updated by AyphixLLC Entertainment 4 months ago 2

https://streamable.com/3ma04

The AI acts "stupid".

Unity version:
2018.4.12f1
Game Creator version:
1.0.5

Answer

Answer
Answered

Have you tried reducing the number of agents? My guess is that you're using Unity's Navigation Mesh. When you tell a character to move to a certain position using the Navmesh AI system, Unity delegates calculating the path to a secondary thread, in case it takes a while, so the game doesn't stall.

Having that many agents is probably increasing the amount of calculations Unity has to make. So, while these paths are being calculated, they follow the previous path.

Answer
Answered

Have you tried reducing the number of agents? My guess is that you're using Unity's Navigation Mesh. When you tell a character to move to a certain position using the Navmesh AI system, Unity delegates calculating the path to a secondary thread, in case it takes a while, so the game doesn't stall.

Having that many agents is probably increasing the amount of calculations Unity has to make. So, while these paths are being calculated, they follow the previous path.

My suggestion would be to group up the zombies into groups, and have a single agent for a single group you can have hordes of zombies then without the game being weird.