Intro I had a simple task to perfectly fit entire 3D scene onto a viewport. There is only one limitation — I’m allowed to only change camera position, meaning that its rotation and fov are locked. How hard can it be? Most probably for a seasoned game developer this is a…