A* Pathfinding Project

AI Path causes colliding with blocking objects


#1

Hello,

I’m using a 2D Grid Graph for a top-down game. Using AI Path to create a path often works, but sometimes fails because the Circle Collider of the AI object is not included, which causes the AI Object to collide mostly on edges.

Does anyone know how to include the Collider, or a better alternative?


#2

Hi

You can adjust how closely the agent follows the path using the ‘pick next waypoint distance’ parameter on the AIPath script. You can also adjust how close to obstacles walkable nodes are allowed to be using the Diameter setting in the grid graph.


#3

Thanks for the fast Reply!

While Setting the next waypoint distance seems to have no effect, the Diameter Setting does work. However, how can I manage this with ai objects with circle Colliders with different sizes? Currently, the Diameter Setting would only manage radius < 0.4f .


#4

Hi

Take a look at https://arongranberg.com/astar/docs/multipleagenttypes.html