I am working with an orthographicCamera in my Scene.
I set the camera in this way:
ortographicCamera = new THREE.OrthographicCamera( canvas_w / - 2, canvas_w / 2, canvas_h / 2, canvas_h / - 2, 0.1, 1000000 );
I am also using an OrbitControls which I set in this way:
controls = new THREE.OrbitControls( ortographicCamera , renderer.domElement );
controls.addEventListener( ‘change’, render );
My problem is simple, when I move the camera using orbitControls I always see objects which shouldn’t be visible because the are back of near frustum plan of my camera.
I have tested multiple versions of three.js and I have obtained the same results.
If I use a PerspectiveCamera it works as expected and objects back of my frustum are not shown.
I have tried to change values in my orthographicCamera without any progress.
I think there is an issue with OrthographicCamera and Near Frustum plane.
You can try the following code, orbit the camera and you will realize that objects that should be frsuted by near Plane are not.
If you look into this simple fiddle and you zoom in you will realize that near frustum plane is not working at all.
https://jsfiddle.net/hxkavzj6/
It show frustum meshes that are nearer than 1 from camera and this is not the case.