Agent gets stuck often and seems to get unstuck when we enable gizmos

I have a similar issue to this in my project, here I used the sample example 2 to reproduce.

Using the samples’ Example2 provided with the A* project, I simply disabled the funnel modifier on the bot and changed its radius to 0.5, height to 2 and scale to 1. I updated the A* components and graph accordingly, all the settings can be seen in the video.

The bot gets stuck often, and seems to get unstuck whenever we enable gizmos.

Unity 2022.2.13f1
astar v4.3.66

bump, not sure if you missed this when you were away.

any updates on this? It happens very often in my project.


I cannot replicate this :confused:

when i have time i will create a sample project using the example from the video above, im able to replicate this all the time, both in my project and in that example from above.

1 Like

@aron_granberg I was able to make a repro project using the sample scene “Example2” that comes with this package.
The bot is set to move to a preset destination, it is marked with a text labeled “Target”, you’ll see as it moves there it will get stuck, if you enable gizmos, it will become unstuck.

Unity v2022.3.9

@aron_granberg did you have a chance to view the repro project?


Sorry, I forgot to answer. Yes, I checked it out and managed to replicate it.

It turns out gizmos was not the issue, but enabling gizmos made the game run at a slightly lower fps, which could make the agent get unstuck.
The real issue was an edge case where the nearest node could sometimes be calculated incorrectly. Leading to the agent getting stuck on an invisible edge.

I’ll include a fix in the next beta update.

1 Like

that’s awesome, thanks a lot.