AI moves through walls, gets stuck or target off grid red nodes


I’m having trouble getting Astar to work correctly, my AIs keep either moving through walls (even though it drew a path around the wall it doesn’t follow the path), gets stuck at a corner or wall or moves directly over red off grid nodes to get to it’s destination.

I am using a basic Grid Graph, with a plane and Cube Obstacles, following the Getting Started Tutorial and using the Bot AI from the Terrain Example 2 scene.

I have tried it in my own project as well as a brand new project, in my own project no matter what I do I can’t get it working correctly, in a brand new blank project in my own scene I can get the AI to go around the walls instead of through them, but then it would still get stuck moving back and forth if the path is too much of a long curve around the wall (depending on the position of the AI, the target and the path curving around the wall)

The only place I can get it to work perfectly in both my own project as well as a brand new blank project is in the Example scenes, nowhere else.

I am using Unity 2019.4.33 and the latest A star package available on the Asset Store.

I’m not sure what I could be doing wrong?

Please, any help or advice on the matter would be greatly appreciated.


Most likely your agent has a “pick next waypoint distance” which is set too high for your game. Try to lower it. That should make the agent follow the path more closely.