Inside of meshes with low height get included in the Recast graph


I have a scenary with three layers: Ground, Walls and Ceiling. As you can see in the image, all three are included in the layer mask to be rasterized:

The ceiling is at a height of 3 units, so I’ve set the ‘Walkable Height’ higher that this value in order to make the inner region of the walls unwalkable. But even setting a very high value, the inner region still appears as walkable.
What am I doing wrong?

PS: I’ve also tried to use the ‘Min Region Size’, but even with a very high minimum region it doesn’t exclude the inner regions either.

Here’s another image of the map:

and the inspector view for the Ceiling gameobject:


Hmmm… I see that your bounding box for the graph is only 3 units tall. It might be that the ceiling is not getting included. Could you try increasing the size of the bounding box on the y axis a bit?

That was exactly it, thank you!

I now get the ceiling as walkable. In order to prevent this I’ve added a RecastMeshObj to the ceiling and set it to Unwalkable Surface. I can do this because in this case I only have one Ceiling object, but if I had a lot of different meshes, would there be an alternative to this approach? Something like limiting the walkable area to a specific height, in this case, ground, or y = 0?

Nothing built-in. The RecastMeshObj component is the right way to do it.

[EDIT] Though, I guess you could add a big invisible collider that obstructs the top faces.

1 Like

Good idea, thank you!