I have multiple objects in my scene. I need to implement Zoom Extents feature that automatically fits(shows) all the objects to screen. In my case, I’m using Orthographic Camera and Arcball Controls.
I tried by creating a bounding box by expanding the box with all objects in the scene and tried to get the distance with object position and camera’s distance so that I can find the zoom level and adjust the zoom level. But it doesn’t actually work