# llGetCameraFOV

*LSL function*

```lsl
float float llGetCameraFOV();
```

- Returns: `float`
- Energy: 10
- Permission: `PERMISSION_TRACK_CAMERA`

Returns a float representing the camera's current field of view (FOV) in radians of the agent who granted PERMISSION_TRACK_CAMERA. Returns 0.0 if permissions are not granted.

Returns a [float](https://wiki.secondlife.com/wiki/float) value for the current camera's field of view (FOV), in radians, of the agent for which the task has permissions.

```lsl title="How to use" frame="terminal"
float result = llGetCameraFOV();
```

## Caveats

Returns zero when permissions have not been granted.

## Examples

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

```lsl collapse={1-20, 26-31}
// say the camera aspect ratio and field of view (FOV)
integer has_perms = FALSE;
default
{
    on_rez(integer a)
    {
        llResetScript();
        has_perms = FALSE;
    }
    state_entry()
    {
        llRequestPermissions(llGetOwner(), PERMISSION_TRACK_CAMERA);
    }
    run_time_permissions(integer permission)
    {
        has_perms = (permission == PERMISSION_TRACK_CAMERA);
    }
    touch_start(integer num_touches)
    {
        if (has_perms)
        {
            float aspect = llGetCameraAspect();
            float fov = llGetCameraFOV();
            llOwnerSay("aspect = " + (string)aspect + "  FOV = " + (string)fov);
        }
        else
        {
            llRequestPermissions(llGetOwner(), PERMISSION_TRACK_CAMERA);
        }
    }
}
```

</details>

## See also

### Functions

- [llGetCameraAspect](/functions/llGetCameraAspect/)
- [llGetCameraPos](/functions/llGetCameraPos/)
- [llGetCameraRot](/functions/llGetCameraRot/)
- [llSetCameraParams](/functions/llSetCameraParams/)
- [llSetCameraAtOffset](/functions/llSetCameraAtOffset/)
- [llSetCameraEyeOffset](/functions/llSetCameraEyeOffset/)

---

*Source: [LlGetCameraFOV](https://wiki.secondlife.com/wiki/LlGetCameraFOV) on the Second Life Wiki. Content from the Second Life Wiki article LlGetCameraFOV (revision 1216343, 2024-03-14), CC BY-SA 3.0.*

---

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