HandleUtility.WorldToGUIPointWithDepth

Declaration

public static Vector3 WorldToGUIPointWithDepth(Vector3 world);

Parameters

world Point in world space.

Returns

Vector3 A Vector3 where the x and y values relate to the 2D GUI position. The z value is the distance in world units from the camera.

Description

Convert a world space point to a 2D GUI position.

Uses the current camera to calculate the projection.

Additional resources: WorldToGUIPoint. GUIPointToWorldRay, RaySnap.


Did you find this page useful? Please give it a rating: