Pixel distance from mouse pointer to a polyline.
public static float DistanceToArc(Vector3 center, Vector3 normal, Vector3 from, float angle, float radius) { Vector3[] dest = new Vector3[60]; Handles.SetDiscSectionPoints(dest, center, normal, from, angle, radius); return HandleUtility.DistanceToPolyLine(dest); }
internal static float DistanceToPolygone(Vector3[] vertices) { return(HandleUtility.DistanceToPolyLine(vertices)); }