I am using NavmeshCut with a polygon shape. One of the Triangles it intersects does not get cut. Is this a bug or limitation? Or is there a way to cut through this?
In this image, you can see the green triangle with the red arrow on is not getting cut. The arrow is pointing to the edge of the NavmeshCut. The bottom section has been cut correctly.
Colors: Green=RecastGraph, Red=Welds added to building to join to recast graph, Salmon=RecastGraph tiles that welds are connected to. Yellow and Top salmon are tiles that the uncut triangle is connected to.
Here is a picture without any cuts to the recast graph.
SOLVED: I had to increase the height property on NavmeshCut to allow for variations in height between recast nodes and terrain.
How it works:
The height check takes the height of the NavmeshCut transform and creates a bounding box using the Height property on the NavmeshCut. The default height is 1 and my transform height was set to the height of the first building piece. So when the recast mesh node height was outside this box, the cut process didn’t check that node.
Lesson learned is to make the Height on the NavmeshCut large enough to intersect the recast mesh nodes. Because the recast mesh nodes do not follow the terrain, this needs to account any variation between the terrain height and the recast graph node height. This can be up to 10 in my scenes.
Therefore when cutting terrain, I will set the NavmeshCut Height to a large number, like 2000, because I want to make sure the cut intersects the nodes. It doesn’t matter how high/low it goes, because I don’t have overlapping nodes in these areas of my world.