World to Screen

Calculate the screen normalized position from world position
Input
Name | Data type | Description |
World pos | Vec3 | The world position to calculate from |
Camera | Camera | The camera whose screen will be the target to calculate the new position on |
Output
Name | Data type | Description |
Screen pos | Vec2 | The screen position to calculate to |
Example

In this example, we first use the World To Screen node to get the projected screen coordinate of our hand, then we use the vertex to rect node to construct a rectangle collider for our 2D image, and lastly we use the point in the box node to detect if the hand center’s screen coordinates collide with the image. We use the collision detection result to toggle the visibility of the sphere
