I have units flying and fighting each other in 3d space. The units are using astar pathfinding to find each other. The units use rigidbodies and they follow the paths made quite loosely and so, due to this, they can end up in parts of the grid that are marked unwalkable. If either the start node or target node is an unwalkable node and it asks for a path, no path gets made by my algorithm. However, a path from the nearest available walkable start node to nearest available end node would still be very useful.
What are ways I can find the nearest walkable node to a given position in an astar grid?