Skip to main content

Camera

API for manipulating the camera.

Functions

Camera.setViewTarget

Sets the target of the camera.

Camera.setViewTarget(position: vector, lookTarget: vector, upDirection?: vector)

Parameters

NameTypeDefault ValueDescription
positionvectorRequiredThe position of the camera.
lookTargetvectorRequiredThe target to look at.
upDirectionvector?Engine.WORLD_UP_DIRECTIONThe up direction of the camera.

Camera.setViewDirection

Sets the direction of the camera.

Camera.setViewDirection(position: vector, direction: vector, upDirection?: vector)

Parameters

NameTypeDefault ValueDescription
positionvectorRequiredThe position of the camera.
directionvectorRequiredThe direction of the camera.
upDirectionvector?Engine.WORLD_UP_DIRECTIONThe up direction of the camera.

Camera.setViewOrientation

Sets the orientation of the camera.

Camera.setViewOrientation(position: vector, orientation: Quaternion)

Parameters

NameTypeDescription
positionvectorThe position of the camera.
orientationQuaternionThe orientation of the camera.