Added collision detection for the camera.