# Not see through models without adjusting clipping panels

I'm making a FPS game in Unity3d with a lot of weapons, but when I'm aiming I can see through the weapon. I know I can adjust the near clipping panel, but when I do that, my terrain starts flickering. Is there some solution?

• Could you post scenes hots of the issues? – Vaillancourt Feb 15 '17 at 20:49

A common solution to this problem is to create a second camera that only renders a specific custom layer. Then, you simply put the weapon in that same layer. The environment and UI are drawn by the first camera, with its ordinary clipping planes, and the second one can be set up to correctly display the weapon without affecting any other parts of your scene.

Of course, the fact that your terrain is flickering when you adjust your camera's clipping planes might also point to another problem that might need looking into.

• the fact that your terrain is flickering when you adjust your camera's clipping planes might also point to another problem that might need looking into. eh not really. The distance of the clipping plane determines how detailed (or rather what the depth values represent in) the z-buffer, and logically depth value needs are different for small stuff close to the camera, like the weapon in your hand, than big stuff far away, like distant terrain. – jhocking Feb 16 '17 at 17:05

You could render the weapon in a separate pass/camera, and just overlay the weapon onto the other view. In Unity this is pretty easy to do by adjusting stuff like the Clipping Mask and Clear Flags of the Camera.