Matrix.CreateLookAt Method (Vector3%, Vector3%, Vector3%, Matrix%)
Microsoft Silverlight will reach end of support after October 2021. Learn more.
Creates a view matrix.
Namespace: Microsoft.Xna.Framework
Assembly: Microsoft.Xna.Framework.Math (in Microsoft.Xna.Framework.Math.dll)
Syntax
'Declaration
Public Shared Sub CreateLookAt ( _
ByRef cameraPosition As Vector3, _
ByRef cameraTarget As Vector3, _
ByRef cameraUpVector As Vector3, _
<OutAttribute> ByRef result As Matrix _
)
public static void CreateLookAt(
ref Vector3 cameraPosition,
ref Vector3 cameraTarget,
ref Vector3 cameraUpVector,
out Matrix result
)
Parameters
- cameraPosition
Type: Microsoft.Xna.Framework.Vector3%
The position of the camera.
- cameraTarget
Type: Microsoft.Xna.Framework.Vector3%
The target towards which the camera is pointing.
- cameraUpVector
Type: Microsoft.Xna.Framework.Vector3%
The direction that is "up" from the camera's point of view.
- result
Type: Microsoft.Xna.Framework.Matrix%
[OutAttribute] The created view matrix.
Remarks
View space, sometimes called camera space, is similar to world space in that it is typically used for the entire scene. However, in view space, the origin is at the viewer or camera.
Version Information
Silverlight
Supported in: 5
Platforms
For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.