Preventing the camera from going out of bounds.