Search code examples
unity-game-engineoculus

How to fix terrain disappearing in Unity with Oculus Rift


I want to have mountains in the distance in unity, so I added terrain with mountains and added textures to the mountains. It looks fine in scene view but when I run it and put the Oculus headset on, parts of the mountain range disappear when I look in their direction. I think it has to do with the distance between my player and the mountains. Is there a setting where I can change and fix this?


Solution

  • If you have a particularly large scene (which I think you may have given that you're talking about mountain ranges) you may want to check that the clipping range on your camera are large enough to render the far parts of your scene.

    You can adjust this through the inspector after selecting the main camera in your scene. In this case you'll want to increase the far plane to reach the furthest mountains in your scene.

    enter image description here

    This would also explain why the mountains appear OK in your scene view, as the clipping planes in the editor update dynamically to fit your currently selected object in the editor.