Skip to main content
Version: 3.9.0

World to Screen

world to screen

Use World to Screen to calculate the screen normalized position from the world position. World to Screen is in the Transform category.

Input

NameData TypeDescription
World PosVec3The world position to calculate from.
CameraCameraThe camera whose screen will be the target to calculate the new position on.

Output

NameData TypeDescription
Screen PosVec2The screen position to calculate to.

Example

world to screen example

This example uses the World To Screen node to get the projected screen coordinate of a hand. It then uses the Vertex to Rect node to construct a rectangle collider for the 2D image. Lastly, it uses the point in the Box node to detect if the hand center’s screen coordinates collide with the image. It uses the collision detection result to toggle the visibility of the sphere.

world to screen node