# llClearCameraParams

*LSL function*

Replaces deprecated `llReleaseCamera`.

```lsl
void llClearCameraParams();
```

- Energy: 10
- Permission: `PERMISSION_CONTROL_CAMERA`

Resets all camera parameters to default values and turns off scripted camera control. Requires the PERMISSION_CONTROL_CAMERA runtime permission (automatically granted for attached or sat-on objects).

Resets all camera parameters to default values and turns off scripted camera control.

```lsl title="How to use" frame="terminal"
llClearCameraParams();
```

## Examples

<details open>
<summary>Example 1</summary>

```lsl collapse={1-44}
integer gEnabled;

askForPermissions()
{
    llRequestPermissions(llGetOwner(), PERMISSION_CONTROL_CAMERA);
}

default
{

    on_rez(integer sp)
    {
        llResetScript();
    }

    state_entry()
    {
        askForPermissions();
    }

    touch_start(integer total_number)
    {

        if (llDetectedKey(0) != llGetOwner())
        {
            return;
        }
        else if (!llGetPermissions() & PERMISSION_CONTROL_CAMERA)
        {
            llOwnerSay("I need permissions to control your camera.");
            askForPermissions();
            return;
        }

        gEnabled = !gEnabled;
        if (gEnabled)
        {
            llOwnerSay("Enabled.");
            llSetCameraParams([
                CAMERA_ACTIVE, 1,
                CAMERA_DISTANCE, 50.0
            ]);
        }
        else
        {
            llOwnerSay("Disabled.");
            llClearCameraParams();
        }

    }

}
```

</details>

## See also

### Functions

- [llSetCameraParams](/functions/llSetCameraParams/)

---

*Source: [LlClearCameraParams](https://wiki.secondlife.com/wiki/LlClearCameraParams) on the Second Life Wiki. Content from the Second Life Wiki article LlClearCameraParams (revision 1214304, 2023-08-12), CC BY-SA 3.0.*

---

From lsl.dev: https://lsl.dev/functions/llClearCameraParams/
