fixed the camera movement and added horizontal movement based on time