Skip to main content
TikTok Effect House Platform Logo
Latest
Download
Log in
Transform

World to Screen

Calculate the screen normalized position from world position

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

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