Navmesh question: want to get a reachable point closest to a given location.

hi,greetings :raising_hand_man:

I want to get a reachable location inside of the navmesh,where is closest to a given location.

visualize the question:


so it’s that when I give a location where is outside the navmesh,I hope the AI walk to the navmesh’s edge .

any tips would be appreciated

Hi! I got a pretty straightforward idea in mind but might not be what you’re looking for. Maybe you can try adding a larger, a more detailed navmesh volume to cover that “unreachable” area and moving the character to that location while also checking if it’s reachable to the existing one. But check the location a bit further than the character to stop the movement before it clips out of the bounds which you prefer to be the limit. I know it’s not possible to have multiple navmesh volumes the intended way but it can be done by using agents. Though maybe this approach is flawed if it’s not possible to activate 2 at the same time for one actor. If so, maybe you can have an invisible shape as the agent for that “out of bounds” nav mesh and have the character follow it. These are what comes to my mind but the question you ask is hard for me as well, especially considering you’re struggling too :rofl:

Here’s a post I found though, maybe that could help: Navmesh Walk to the Edge

1 Like

@VisAgilis thank your quick response :joy: .and saved me.
the link is useful.
It turned out super simple.unreal is so huge,you don’t know where might sits a handy build-in node.

I’m also going to share how to use this node

1 Like