Setup camera distance for both perspective and orthogonal mode.