How to build distance maps from the navigation mesh

I’m looking to build distance maps based on the navmesh. Basically doing a Dijkstra search and returning the poly’s and their distance to the start position. Clamped to a max radius of course:) Ideally, so we can use this data in EQS and where we have a lot of things pathfinding to a single point or area :slight_smile:

How would you go about this? I basically need findPolysInPathDistance but with a distance for each poly. I’m prepared to just write another version of that function. But I was wondering if there was a slicker way to do it.

Thx

I’m not aware of any better way of doing it. You need to explore poly graph from requested spot and get path lengths to each returned node.

ARecastNavMesh::GetPolysWithinPathingDistance has FRecastDebugPathfindingData* Param, which basically dumps entire node pool - check UEnvQueryTest_PathfindingBatch::RunTest() for use case example.

Yeah, that’s what I ended up doing. It was worth a shot to see if you guys knew of a better way. Thanks :slight_smile: