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

Namespace:  AForge.Math
Assembly:  AForge.Math (in AForge.Math.dll) Version: 2.2.5.0 (2.2.5.0)

Syntax

C#
public static Matrix4x4 CreateLookAt(
	Vector3 cameraPosition,
	Vector3 cameraTarget
)

Parameters

cameraPosition
Type: AForge.Math..::.Vector3
Position of camera.
cameraTarget
Type: AForge.Math..::.Vector3
Target point towards which camera is pointing.

Return Value

Returns a view matrix.

Remarks

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

See Also