Camera.lookAt

Creates a view matrix looking at a position.

class Camera
final static
mat4f
lookAt
(
vec3f targetPos
,
vec3f cameraPos
,
vec3f worldUp = vec3f(0, 1, 0)
)

Parameters

targetPos
Type: vec3f

The position for the camera to look at.

cameraPos
Type: vec3f

The camera's position.

worldUp
Type: vec3f

The up direction in the world.

Return Value

Type: mat4f

A right handed view matrix for the given params.

Meta