Skip to content
AEOWUN
Docs Menu

Camera

Look up camera calls and properties.

camera.get_horizontal_basis()

Read camera-relative forward and right directions.

Arguments

No arguments.

Returns

[forward, right], each a three-number vector.

Works with

The active gameplay camera.

Missing values and errors

This supplies directions, not movement.

debug.log(camera.get_horizontal_basis())

camera.set_position(x, y, z) or camera.set_position([x, y, z])

Place the gameplay camera.

Arguments

Three numbers, or one basket of three numbers.

Returns

nil.

Works with

The active gameplay camera.

Missing values and errors

Wrong counts, types, or basket lengths report an error.

camera.set_position([0, 2, 5])

camera.set_target(x, y, z) or camera.set_target([x, y, z])

Choose the gameplay camera target.

Arguments

Three numbers, or one basket of three numbers.

Returns

nil.

Works with

The active gameplay camera.

Missing values and errors

Wrong counts, types, or basket lengths report an error.

camera.set_target([0, 2, 5])

camera.set_orientation(yaw, pitch)

Set gameplay camera orientation.

Arguments

Two numeric angles used by the gameplay camera.

Returns

nil.

Works with

The active gameplay camera.

Missing values and errors

Wrong argument counts or types report an error.

camera.set_orientation(0, 0)

[BETA] marks features newer than the current public release. Current release: 0.8.0.