breaking camera tilt control into separate function