Skip to main content

Camera3D

Description:

  A class for 3D camera object in the game engine.

Inherits from: Camera.

position

Type: Field.

Description:

  The camera position.

Signature:

position: Vec3

target

Type: Field.

Description:

  The camera target point.

Signature:

target: Vec3

up

Type: Field.

Description:

  The camera up vector.

Signature:

up: Vec3

lookAt

Type: Function.

Description:

  Sets the camera position, target and up vector.

Signature:

lookAt: function(self: Camera3D, position: Vec3, target: Vec3, up?: Vec3)

Parameters:

ParameterTypeDescription
positionVec3The camera position.
targetVec3The camera target point.
upVec3[optional] The camera up vector. Defaults to Vec3(0, 1, 0).