Is there a built-in way to get the nearest node in a given direction? As it stands, the nearest node may result in a less than optimal path if trying to reach the closest edge of an irregular shape.
For instance, in this example, the red circle is where the AI went and the green circle is where I wanted him to go.
Technically the red circle is the nearest node, which is why I need it to factor in direction as well. Maybe I’m going about this the wrong way, as I really just need the AI to reach the closest edge of the unwalkable area. Can you recommend a simple way to do this?
Any help is appreciated, thanks!