Seeker wrong path

Hello! I have an issue when enemies try to follow a player. In my game, the player spawns enemies within a certain radius. My problem is that when the enemy appears at a greater distance (around 25 units more) or when the player, being faster, moves away from the enemies, they become confused, following an incorrect path, looping back and forth without actually pursuing the player. The enemy prefab has the AIPath, Seeker, and AI Destination Setter components to set the target.

Also, I’m attaching the values of the Pathfinder component in the scene.


image

Hi

Possibly the paths take so long to calculate that the agent gets confused when it tries to follow them, because it has moved so much since it started calculating the path.

You are using a very large grid graph. If possible, I’d recommend using a recast graph instead.
Or if not, see if you can increase the node size of the graph to make the path calculations a bit faster.