core.camera.set_active

Client

Sets the active camera


Syntax

local status = core.camera.set_active(
    camera = nil
)

Parameters

TypeNameDescription
cameracameraCamera instance to set as active
Omitting this argument will deactivate the currently active camera

Returns

TypeNameDescription
boolstatustrue on successful execution, false otherwise

Examples

Set a camera as active
local entity = core.camera.create()

core.camera.set_active(entity)
Deactivate the current camera
core.camera.set_active()

On this page