ServersYour serverFor creatorsForumFAQDocumentationSecurity
Download the launcher
  1. Documentation
  2. Client functions
  3. setCameraRenderMatrix

Function

setCameraRenderMatrix

ClientDrawing (dx)Trilogy Hub only

Places the camera like setCameraMatrix: the position, the point it looks at, roll and field of view (5-170, 70 by default). It detaches the camera from an element.

Syntax

bool setCameraRenderMatrix(element camera, float x, y, z, float lx, ly, lz [, float roll = 0, float fov = 70])

Arguments

cameraelement
The camera.
x, y, zfloat
Position.
lx, ly, lzfloat
The point it looks at.
rollfloat, optional = 0
Roll in degrees (positive = to the right).
fovfloat, optional = 70
Field of view.

Returns

true on success.

Example

A top-down view of a junction.

local cam = createCameraRender(512, 512, 10)
setCameraRenderMatrix(cam, 1544, -1675, 60, 1544, -1674, 0, 0, 90)

See also