Mat4:lookAt
Sets a transform matrix that positions a viewer so that it looks at a target point.
m = Mat4:lookAt(from, to, up)
Arguments
Name | Type | Default | Description |
from | Vec3 | The position of the viewer. | |
to | Vec3 | The position of the target. | |
up | Vec3 | Vec3(0, 1, 0) | The up vector of the viewer. |
Returns
Name | Type | Description |
m | Mat4 | The original matrix. |
See also
Quat:direction
Mat4