For the complete documentation index, see llms.txt. This page is also available as Markdown.

renderer.worldToScreen

worldToScreen(point): Vec3

Projects a world position onto the screen. Returns a Vec3 where x and y are screen pixels and z is the view depth (divide a size by it to scale with distance). Returns null when the point is behind the camera.

Parameters

point

Vec3

The position in world coordinates.

Returns

Vec3

A Vec3 of (screenX, screenY, viewDepth), or null.

Last updated