Mesh disappears when looking at it from a certain direction

I created randomly generated mesh to create a terrain which worked great, but the whole thing disappears when looking at it from a certain angle. Here is a picture of the terrain.


An then, I rotate the view a tad bit upwards and the whole things disappears, even though the tips of the mountains should still be there. Here is a picture with the mesh selected.

Anyone know why this is happening? Maybe Unity thinks the mesh doesn’t need to be rendered because it is deemed “out of sight”? Help!

PS: same thing happens in game view no matter where I am positioned always when looking at the sky box above the terrain.

You need to update the mesh bounds after generating it with mesh.RecalculateBounds(), otherwise Unity uses the old ones and as you said, culls it because its bounding box is not visible.

2 Likes