viewToWorld

open fun viewToWorld(viewPosition: Float2, z: Float = 1.0f): Float3

Get a world space position from a view space position.

Return

The world position of the point.

Parameters

viewPosition

normalized view coordinate x = (0 = left, 0.5 = center, 1 = right) y = (0 = bottom, 0.5 = center, 1 = top)

z

Z is used for the depth between 1 and 0 (1 = near, 0 = infinity).