Hi,
I’m attempting to use A* Pathfinding free version and GridGraph to do pathfinding on a 2d, top-down, sprite based map. Everything is working nicely, except one thing – I need to be able to choose to create a path to an “obstacle” (something that blocks pathfinding), and have it give me a path to the closest walkable node. I thought I should be able to do this using the start-end modifiers, however it is always determining the closest node as the one closest to 0 in y-value. I have tried every exactness modifier available, it yields the same result. Below is a picture of an incorrect path it generates for me, when I use StartPath. I am attempting to create a path to the grey brick tile.
This is NOT correct, the closest tile to the grey tile is the one directly above the grey tile, but it still gives me a path to the one directly below the grey tile.
No matter what direction I path to the tile from (diagonals included), it gives me a path to the tile below the obstacle, and I do not understand why. Am I missing something obvious?