Camera

self:set_dimension

Client

Sets the dimension the camera renders

Syntax

local status = self:set_dimension(
    dimension
)

The client only renders the dimension of its active camera.

  • Active camera — entities outside the camera's dimension are hidden.
  • Inactive camera — the new dimension is applied once the camera becomes active.

Parameters

TypeNameDescription
intdimensionDimension id the camera will render, from 0 to 65535

Returns

TypeNameDescription
boolstatustrue on successful execution, false otherwise

Examples

Set the dimension of a camera
local entity = core.camera.create()

entity:set_dimension(1)

On this page