Click or drag to resize
Accord.NET (logo)

Matrix4x4CreateLookAt Method

Creates a view matrix for the specified camera position and target point.

Namespace:  Accord.Math
Assembly:  Accord.Math (in Accord.Math.dll) Version: 3.8.0
Syntax
public static Matrix4x4 CreateLookAt(
	Vector3 cameraPosition,
	Vector3 cameraTarget
)
Request Example View Source

Parameters

cameraPosition
Type: Accord.MathVector3
Position of camera.
cameraTarget
Type: Accord.MathVector3
Target point towards which camera is pointing.

Return Value

Type: Matrix4x4
Returns a view matrix.
Remarks

Camera's "up" vector is supposed to be (0, 1, 0).

See Also