A* Pathfinding Project

How can get path at 2d grid?


Hello. I bought package and read document.
But I got 3 questions.
All my questions are related with 2d Grid.

  1. How can i get path at 2d grid ? (I just want to get path without moving.)
  2. How can i add unwalkable node to 2D AStarPath before scan ?
    (i want to modify node state many time at runtime)
  3. Is there a simple way to check if it is a walkable position?

Could you explain this? Thanks



  1. See https://arongranberg.com/astar/docs/callingpathfinding.html#calling-directly
  2. See https://arongranberg.com/astar/docs/graph-updates.php#direct
  3. You can use
if (AstarPath.active.GetNearest(somePoint, NNConstraint.None).node.Walkable) {


thanks aron_granberg !!