Find the point on navmesh closest to some FVector (not on navmesh)?

I think Project Point To Navigation is just a simple node to basically do a trace to the navmesh and then offset the target point onto the navmesh if it’s not there already. Its used for minor adjustments and for detecting if the target location is or is not on the navmesh.

So if your AI is somehow moved off the Navmesh (let’s say thrown) then you could get the actor location of your AI, ProjectPointToNavigation, then from the Return value, plug it into a branch and from False you can run some extra code to get the nearest navigable location and make whatever adjustments necessary to get your character over there (like teleport them or Lerp them onto it). For example, you can use the GetRandomPointInNavigableRadius with a high radius value to grab a point that IS on the NavMesh and then lerp the actor there.

The issue is that RandomPointInNavigableRadius won’t return the nearest point, just one at random, so if you need the nearest point, you either have to set your radius to be small and hope that your character isn’t too far off, or do a bunch of checks, store them in an array and then figure out which one is closest to their current location with by getting the Vector of the point and the vector of your character and the subtracting the two points to see what the new length is. Basically, it’s a lot of extra work and there doesn’t seem to be an out-of-the-box node to get the nearest nav point.