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
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
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.