self:set_fov
Client
Sets the camera's field of view
Syntax
local status = self:set_fov(
fov
)Only applicable in perspective projection mode. Refer core.camera.set_projection to configure the active projection mode.
- Perspective mode required — calling this function in any other projection mode will have no effect.
- Recommended usage — combine with
core.camera.projection.PERSPECTIVEto switch projection before adjusting FOV.
Parameters
| Type | Name | Description |
|---|---|---|
float | fov | Field of view in degrees |
Returns
| Type | Name | Description |
|---|---|---|
bool | status | true on successful execution, false otherwise |
Examples
local entity = core.camera.create()
entity:set_fov(90)