How to exclude object from near camera clipping
This Question asks how to set per-object clipping to stop specific far away objects being clipped. The LayerCullDistances property achieves this, but only controls the far clipping plane, not the close plane.
Is there a similar alternative which can configure the close plane?
What would the reason be for Unity to expose the Far plane, but not the close plane?
Thanks! Jethro
The layer cull distance is not the far plane of the camera, but the plane of culling. The camera near/far clipping planes is clipping rasterization of pixels in the middle of an object rendering, while the cull distance will render / not render the whole object.
Answer by kotoezh · Oct 05, 2018 at 06:28 PM
Solving a similar problem came to this solution:
I placed the objects which should be clipped near the camera in a dedicated layer
added a copy of the main camera component, and
changed its Culling mask limited to this layer,
set its near Clipping plane to desirable (0.05), and far clipping plane to 1 (which is greater than the near clipping plane of my main camera),
set its Depth larger than the Depth of the main camera.
Set the new Camera Clear Flags to SkyBox
Set main Camera Clear Flags to Don't Clear
This works in mobile VR mode also. Didn't notice any performance issues
Your answer
Follow this Question
Related Questions
Vegetation is clipping too far 0 Answers
*Complete noob* camera seeing through walls 2 Answers
Best way to run a switchable 1st to 3rd person camera system? 1 Answer
Water surface - User can see through surface (Near clipping) 0 Answers
Camera culling mask does not work on World Space Canvas 0 Answers