public Vector3 GetPointInWorldSpace() { Ray ray = HandleUtility.GUIPointToWorldRay(Event.current.mousePosition); RaycastHit hit; if (Physics.Raycast(ray, out hit)) { return hit.point; } return Vector3.zero; }