self:set_keep_aspect

Client

Sets the aspect ratio preservation mode of the camera


Syntax

local status = self:set_keep_aspect(
    mode
)

Parameters

TypeNameDescription
core.camera.keep_aspectmodeAspect ratio mode to apply

Returns

TypeNameDescription
boolstatustrue on successful execution, false otherwise

Examples

Set the keep aspect mode of a camera
local entity = core.camera.create()

entity:set_keep_aspect(core.camera.keep_aspect.HEIGHT)

On this page