Edit

Share via


Matrix4x4.CreateLookTo(Vector3, Vector3, Vector3) Method

Definition

Creates a right-handed view matrix.

public static System.Numerics.Matrix4x4 CreateLookTo(System.Numerics.Vector3 cameraPosition, System.Numerics.Vector3 cameraDirection, System.Numerics.Vector3 cameraUpVector);

Parameters

cameraPosition
Vector3

The position of the camera.

cameraDirection
Vector3

The direction in which the camera is pointing.

cameraUpVector
Vector3

The direction that is "up" from the camera's point of view.

Returns

The right-handed view matrix.

Applies to

Product Versions
.NET 8, 9, 10