Skip to main content

WorldToViewportPoint

Camera.WorldToViewportPoint(vector3: Position, boolean?: ToEdges, number?: EdgeOffset)
Position
vector3
required
The world position to project.
ToEdges
boolean
Clamps the projected position to screen bounds, in return the projected position will always be OnScreen.
EdgeOffset
number
The offset between the clamped projection and the edge of the screen. Required when using ToEdges. Set this to the width (in pixels) of your element for the best result.