Skip to content

Latest commit

 

History

History
46 lines (25 loc) · 1.03 KB

ScreenToWorld.float.float.vec3.vec3.md

File metadata and controls

46 lines (25 loc) · 1.03 KB

ScreenToWorld(float, float, vec3, vec3)

Gets a ray going from ($plink screenX;, $plink screenY;).

void screenToWorld(float screenX, float screenY, out vec3 worldNear, out vec3 worldFar)

Parameters

screenX

Type: float

The x screen coordinate.

screenY

Type: float

The y screen coordinate.

worldNear

Modifiers: out

Type: vec3

Position 2 units away from the camera.

worldFar

Modifiers: out

Type: vec3

Position 400 units away from the camera.

Remarks

  • Due to a technical issue, still to be fixed, the output lags by one frame. I.e. if you Set Camera on frame N, then this block's output will change on frame N+1 - the function will not work on the first frame.

Related