- Home /
Seeing the terrain through my mesh
I'm building a college campus in Unity, and for the grounds I've made a Unity terrain, exported it to Max, draped extruded sidewalks onto it, and then placed those mesh objects back into Unity. So now I have a terrain object with 6" thick ribbons of sidewalk laying on top of it.
From the ground it works fine. The trouble is, my character can fly, and once you get 20 or 30 m off the ground, it glitches. You start seeing the terrain peek through the road meshes. You know how that happens when you have two surfaces too close to each other in Max and try rendering? That's it exactly. Is there any way I can tell Unity to always show the mesh in front of the terrain?
Answer by flaviusxvii · Jul 11, 2012 at 10:39 PM
This is called z fighting. Sometimes you ou can help things by bringing your farClipPlane in and pushing your nearClipPlane farther away.
http://docs.unity3d.com/Documentation/ScriptReference/Camera.html
Awesome, that term is exactly what I needed to get this figured out. I still have a few bugs to work out with it to make it work well at every elevation, but now I know where to look. Thanks!
Your answer
Follow this Question
Related Questions
Questions about render distance in an open world game 0 Answers
Combining Objects for Performance 0 Answers
rend.mesh ? I can't replace mesh 1 Answer