Click or drag to resize
Ab4d.SharpEngine logo

MathUtilsUnproject Method

Projects a 3D vector from screen space into object space.

Namespace: Ab4d.SharpEngine.Utilities
Assembly: Ab4d.SharpEngine (in Ab4d.SharpEngine.dll) Version: 2.0.8956+4c7684e186ca1be74e7a284fbe739d9a1b843d3c
Syntax
C#
public static Vector3 Unproject(
	 in Vector3 vector,
	float x,
	float y,
	float width,
	float height,
	float minZ,
	float maxZ,
	 in Matrix4x4 worldViewProjection
)

Parameters

vector  Vector3
The vector to project.
x  Single
The X position of the viewport.
y  Single
The Y position of the viewport.
width  Single
The width of the viewport.
height  Single
The height of the viewport.
minZ  Single
The minimum depth of the viewport.
maxZ  Single
The maximum depth of the viewport.
worldViewProjection  Matrix4x4
World-view-projection matrix.

Return Value

Vector3
The vector in object space.
See Also