lookTowards

fun lookTowards(eye: Float3, forward: Float3, up: Float3 = Float3(z = 1.0f)): Mat4

Returns a view matrix for a camera at eye pointing in forward direction.

Return

the view matrix

Parameters

eye

the camera position in world space

forward

the direction the camera faces (need not be normalized)

up

the world up vector; defaults to +Z