Is it possible to block navmesh generation at certain areas with Recast graph ( so its completly unwalkable and performance is saved), however not use components like NavmeshCut?
We have huge generated maps, however currently with mountains, the navmesh generates inside them. I know its not ideal, but right now we need to avoid this.
If those tiles have box colliders, then they should automatically be excluded. Otherwise, you can attach the RecastMeshObj component to those objects and mark the surface as Unwalkable, and optionally you can also mark it as “solid”. However, for mesh colliders, you’ll need to have triangles on the bottom side of the object to make it work with solid.
But the maps could have tens of thousands of these mountain tiles (250x250 map)that’s the reason I cannot just use collides, it would drag performance down and I was looking for a way how to just mark it with a code and not create additional game objects with colliders.
These blocks are just mesh procedurally generated, issue is they have mesh even inside (on Y 0 plane as well) that’s why it’s detecting walkable areas inside.
So increasing climb height won’t help, as mesh is on same level as walkable area.
So there is no API to cut mesh via code only without using existing components?
its 0.5 by default, so it doesnt calculate top of mountains where pathing is not possible anyway.
Now for test if I increase it to e.g. 10, and have walkable height also 10, the small navmesh cells disppear, but instead walkable grid is generated everywhere on top of mountains which is even worse I think. Maybe we can somehow prevent this?
If you make sure to put the mountains mesh on a separate layer, in the next version you’ll be able to mark whole layers as having an unwalkable surface. Or, right now, you can add the RecastMeshObj component to the mountain mesh and mark its surface as unwalkable (I assume it is merged somehow already, for performance).