Modified the camera function.