Camera change radius with clipping

How can you change the minimum radius of a camera (ArcRotateCamera in this case) to prevent it from clipping through a mesh? Also, the mesh is not the target of the camera.

camera.minZ and camera.maxZ are in charge of clipping.

Yes, how can we change the radius so that it doesn’t clip? Would we just set the max to 0?

I’m not sure about your case, but if the mesh is clipped, because your camera is too close to mesh, then you would lower you minZ value like:

camera.minZ = 0.01; // or lower

If it is clipped, because the mesh is too far from camera, then you would increase maxZ.

Atleast this is what I know.

2 Likes

Thanks!