Project point to navigation

Hello!

I have a point in space where I would like my AI to go to, but it is not inside the nav geometry.
As the MoveTo node doesn’t support that by default, I would need some functionality, which will convert this point into a valid navigable point that is as close to the original target point as possible.

Does anybody know about a method to handle such a situation?

Thanks!

Are we talking Blueprints or C++ here? There’s a basic support for custom paths in BP, I’ll check for details and get back to you…
Unless we’re taking C++, then everything’s possible!
Which one is it?

–mieszko

I am sorry I forgot to mention that! I am using C++ (blueprint would be fine as well).

If you have a point off-navmesh and want AI to move as close to it as possible all you need is a bit enough of Navigation Query Extent. Currently your only option is to increase NavigationSystem SupportedAgent's properties (can be done via project properties in the editor). I’ll make a note that this need to be more flexible.

Cheers,

–mieszko

Could you please talk more about how to pick a point on the navmesh close to an off-mesh point?
So the problem is the target (usually the player can be off-navmesh) so I’d like to make the AI move to it as close as possible.
Also, I don’t want the AI to lose aggro on an off-mesh target so can I ask if there is a way to check whether the target (off-mesh) is still within a range to the on-mesh NPC?