IsValidAILocation always returns true.

What is the point of “Is Valid AI Location”? What does it check?

For me it returns true, even if the location is completely out of nav mesh bounds, or inside a wall, or even both at the same time. It never returns false.

And how can I check if a point (location) is navigable (Is within navmesh and can be reached by a certain AI)?

Additionally, “GetRandomReachablePointInRadius” Fails a lot when there is no reason for it to fail.

In the screenshot below, the white spheres are the locations, that are being used to GetReachablePointInRadius around. The red circles are when it succeeds. The prints on the left side of the screen are whether it succeeds or not.

As you can see, most of the time it fails, even though all points are completely within navmesh and not obstruted by anything.


The node IsValidAiLocation will only verify the min/max predefined float number that it can support, it has nothing to do with the nav mesh range.

1 Like

You can use this ai node, will return fail if the ai can’t reach a destination:
image

Any other nodes for the same purpose, that I can use inside a function?

I am essentially making my own query system, where from 8 available locations I choose the best based on certain criteria. One of the criteria of course being that it should be reachable.

Don’t want to use the actual Query system, because I am not using an AI Behavior tree (because of it being too limited for my complicated purposes), also because it being asynchronous is a whole another headache.

Try with these:

1 Like

ProjectPointToNavigation worked perfectly, solving all the issues above. Thanks!

1 Like

A pleasure :innocent:

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.