HandleUtility.DistanceToRectangle Manual     Reference     Scripting  
Scripting > Editor Classes > HandleUtility
HandleUtility.DistanceToRectangle

static function DistanceToRectangle (position : Vector3, rotation : Quaternion, size : float) : float

Description

Pixel distance from mouse pointer to a rectangle on screen

Calculates the screen space distance from the mouse pointer to the rectangle at given world space position with the given rotation and size. The rectangle is defined by the right and up vectors of the rotation in Euler angles.

See Also: DistanceToDisc.