Camera move between two object based on a distance

If you want to move the camera, the best way is using more than one camera and view targets. It looks like the camera is moving, but you just don’t have the hassle: