| Parameter | Description |
|---|---|
| world | Point in world space. |
Vector2 A Vector2 where the x and y values are the 2D GUI position of the world space point.
Convert a world space point to a 2D GUI position.
Uses the current camera to calculate the projection. Use this to place Editor GUI elements based on world positions.
If the world point is outside the camera's frustum, WorldToGUIPoint returns x/y coordinates that might be outside the SceneView’s pixel rect.WorldToGUIPoint discards depth information. To also get the view-space depth of the point, use WorldToGUIPointWithDepth, which returns the depth in the z component of a Vector3.
Additional resources: WorldToGUIPointWithDepth, GUIPointToWorldRay, RaySnap.