Navmesh: testing for any obstruction within an area

I’m looking for some way (from C++) to test if an area is wholly navigable. For example, take a point on the nav mesh and then test whether there are any obstructions (i.e. non-navigable space) within a radius.

There is an easy, though inefficient, fallback, which is to project a point to the navmesh and then cast some rays radially to find obstructions. I’m hoping though there is a better area/area operation that can be used.

It seems like testing an area for clear navigability should be a pretty common operation – am I just not finding it?

There is a function that does just that in Recast lib, dtNavMeshQuery::findDistanceToWall, but funny enough no one was asking about it yet :slight_smile:

I’ll implement a wrapper and submit it today.

Cheers,

–mieszko

Haha, awesome. Thank you, Mieszko! :slight_smile:

For the reference: https://github.com/EpicGames/UnrealEngine/commit/7964f1a76a403c79bfe65d319825e3aff1342a62
Enjoy :slight_smile: