- Home /
How can I hide terrain above a certain elevation?
Hello,
I'm trying to make a base building mechanic where the base is constructed on a grid with different levels of elevation. A good example of this is the screenshot below.
Underground this was pretty easy, but now that I am looking at the above ground portion I'm a bit stumped.
I want to use some kind of plane object like unity terrain to represent the above ground portion but mask the portion of the mesh that is above a certain y value. I've been experimenting using a depth mask shader and a cube, but when I successfully mask I can't see the terrain underneath the cube. I only want to mask what is inside. Does anyone know of a trick to accomplish this? I'm out of ideas and search queries.
Your answer
![](https://koobas.hobune.stream/wayback/20220613191430im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
how to produce endless terrain illusion? 1 Answer
Grass is very high 1 Answer
Which program would you say is the best for modelling ? 3 Answers
How do I fix this weird texture glitch on Terrain? 0 Answers
Visual glitch with my primitive shapes 0 Answers