C3DCamera::Unproject

Top  Previous  Next

Syntax:

 

Unproject(float  x, float  y, float  z), VECTOR3

 

Purpose:
Projects a vector from screen space into object space.

 

Parameters:

x, y, z - The coordinates and depth of the point to unproject.

 

Returned value(s):

A VECTOR3 UDT containing the point in 3D camera space corresponding to the 2D input.

 

Application:

vSelect = cam1.Unproject(s.MouseX(), s.MouseY, .5)

 

Additional Info:

On input X and Y are the screen point, Z is a value between 0.0 and 1.0 where 0.0 would correspond to the front plane and 1.0 the back plane. For example if your current backplane was set to 500.0 and frontplane of 1.0 an input Z of .5 would produce an output Z of approximately 250.0

 

See Also:

Project