Sandbox: https://codesandbox.io/p/sandbox/3d57wq
Objects placed far from the camera target disappear even with far=2000. Seems like they’re being clipped by the top/bottom frustum planes, not the near/far planes. Is this expected? How can I fix it?
Sandbox: https://codesandbox.io/p/sandbox/3d57wq
Objects placed far from the camera target disappear even with far=2000. Seems like they’re being clipped by the top/bottom frustum planes, not the near/far planes. Is this expected? How can I fix it?
It’s clipping out of the .bottom of the frustum. not near/far.
You just don’t see it initially because of the zoom level.
The way orbitcontrols works is that the camera always “looks at” the controls.target point (0,0,0) by default, so when you set the position of the camera.. [20, 20, 20]
You’re making the camera point at a 45 degree angle at 0,0,0.
If you set the orbitcontrols . target to [20,0,20] then you should be looking straight down along the Y axis, and you won’t get that clipping.
Orbitcontrols on an ortho camera doesn’t change the position of the camera on mousewheel zoom, only it’s “zoom” (scaling) factor.
So you don’t see the clipping until you “zoom in” (scale the viewport down enough to see what was previously clipping off screen)