# CAMERA::SET_CAM_FOV

- **Hash:** `0x27666E5988D9D429`
- **Namespace:** CAMERA
- **Runtime name (Lua/JS):** `SetCamFov`
- **Side:** client (game native)
- **Name status:** official
- **Documentation:** described with examples
- **Since game build:** 1207
- **URL:** https://natives.borderlinerp.com/natives/CAMERA/SET_CAM_FOV

## Signature

```c
void SET_CAM_FOV(Cam cam, float fieldOfView);
```

## Parameters

- `cam` (`Cam`)
- `fieldOfView` (`float`) — Vertical field of view in degrees, as a float.

## Returns

`void`

## Description

Sets the field of view of the cam.

Min: 1.0f
Max: 130.0f

## Verified notes

A whole number coming from NUI or JSON (a slider value `35`, a stored `1.0` serialised as `1`) arrives in Lua 5.4 as an integer. Passed here it is read as the wrong bits and ignored: no error, the FOV just does not change.

It is easy to miss: interpolated values are already floats, so a camera path with several keyframes works and one with a single keyframe does not.

```lua
SetCamFov(cam, (tonumber(data.fov) or 50) + 0.0)
```

This applies to every float parameter of every native. Integers that really are integers (handles, hashes, hours) must not be converted.

Verified in game on the Borderline RP server, September 2026.

## Usage

### Lua

```lua
SetCamFov(cam, fieldOfView)

-- always available, by hash
Citizen.InvokeNative(0x27666E5988D9D429, cam, fieldOfView)
```

### JavaScript

```js
SetCamFov(cam, fieldOfView);

// by hash
Citizen.invokeNative('0x27666E5988D9D429', cam, fieldOfView + 0.0000001);
```

### C#

```csharp
Function.Call((Hash)0x27666E5988D9D429, cam, fieldOfView);
```

- Float parameters: Lua integers (`10`, or whole numbers decoded from NUI/JSON) are sent as ints and read as garbage. Write `10.0` or `value + 0.0`. The generated JS wrappers add `0.0000001` to non-zero floats for the same reason.

## See also

- [CAMERA::CREATE_CAM_WITH_PARAMS](https://natives.borderlinerp.com/natives/CAMERA/CREATE_CAM_WITH_PARAMS.md)
- [CAMERA::GET_CAM_FOV](https://natives.borderlinerp.com/natives/CAMERA/GET_CAM_FOV.md)

*Sources: alloc8or RDR3 NativeDB, RedM Natives (verified notes).*
