ScreenPosTo3d_v3 Op

ScreenPosTo3d

convert screen coordinates to a 3d position


<p>Useful when you want to do things like convert the mouse co-ordinates on screen to 3d co-ordinates.</p>


Full Name
  • Ops.Gl.Matrix.ScreenPosTo3d_v3
Visibility
  • Core Op - Official cables op
License
  • MIT
Authorgithub


Example Patch Mouse Draw Spline Example

Using the ScreenPosTo3d op we can convert the mouse coordinates to 3D coordinates. For this you need to disable the Flip Y port of the Mouse op. Using the ArrayPushValue3X op we add the (converted) x and z coordinates (together with z=0) to the array and draw it with the SimpleSpline op.

Open In Editor

INPUT PORTS


Exec (Trigger)

<p>Trigger in </p>

X (Number)

<p>Mouse co-ordinates in pixels X axis</p>

Y (Number)

<p>Mouse co-ordinates in pixels Y axis</p>

Input Type index (Number:

<i>integer</i>

)

OUTPUT PORTS


Trigger out (Trigger)
Result X (Number)

<p>Normalized position on the X axis</p>

Result Y (Number)

<p>Normalized position on the Y axis</p>


Patches using ScreenPosTo3d_v3

  • Examples
  • Public
  • My Patches

Changelog


featureswitch for normalized input valuesuser avatarpandur - 2022-12-14 17:10