self:get_fov

Client

Retrieves the camera's field of view


Syntax

local result = self:get_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

No parameters are accepted by this function

Returns

TypeNameDescription
floatresultCurrent field of view in degrees

Examples

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

core.engine.print("info", entity:get_fov())

On this page