I am trying to get a NavMeshEdges in Box extents from RecastNavMesh,
So far I found how to get NavPolys Array from the NavMesh (NavMesh->GetPolysInBox(...))
But I am struggling to understand how would I extract them from the NavPoly.
What are NavPolys and what are NavTiles - how would I get a NavMeshEdges ?
P.S. (Don’t link Rama’s tutorial it doesn’t cover that up).
I can suggest looking at FNavMeshSceneProxyData::GatherData which in turn calls FPImplRecastNavMesh::GetDebugGeometry which essentially translates recast’s navigation graph into polygons and edges. This should give you some idea how that data is stored in Recast an may be even enough for your use case (and definitely good enough for a POC).
Interestingly enough I tired to do exactly the same yesterday to access the debug array, but it always returned an empty array so I left it be and tried another way - after your answer I realized that I had to set the FRecastDebugGeometry::bGatherNavMeshEdges to true…
As far as I understand the Edges amount must be an Even number - because a wall represented by 2 Edges ? (And there is no Edge share → since it is an FVectors array). So to get a wall segment would be NavMeshEdges[i] NavMeshEdges[i+1] i+=2 ?