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.PERSPECTIVE to switch projection before adjusting FOV.

Parameters

TypeNameDescription
floatfovField of view in degrees

Returns

TypeNameDescription
boolstatustrue on successful execution, false otherwise

Examples

Set the camera FOV
local entity = core.camera.create()

entity:set_fov(90)

On this page