This method is just something I did quickly to achieve the effect I wanted and I would think there’s far better ways to do it but essentially you want to have a variable, “camera_tilt_factor”, that increases/decreases when, for example, the up/down arrows are pressed. You would then multiply the distance offset between each frame (dist) by this amount, whilst multipling the camera’s vertical resolution by the same (or a proportional) amount.
i.e. camera_tilt_factor = 1; dist * camera_tilt_factor = 1; vertical_resolution * camera_tilt_factor = 540; camera_tilt_factor = 1.5; dist * camera_tilt_factor = 1.5; vertical_resolution * camera_tilt_factor = 810;
Of course, depending on how your camera is set up you might want to make the scaling factor for vertical_resolution/dist proportional to one another, rather than simply 1:1.