DistanceToArc(Vector3, Vector3, Vector3, float, float)
Returns the distance in pixels from the mouse pointer to a 3D section of a disc.
Read time 1 minuteLast updated 12 days ago
Definition
- Type: Method
- Namespace: UnityEditor
- Assembly: UnityEditor.CoreModule
public static float DistanceToArc(Vector3 center, Vector3 normal, Vector3 from, float angle, float radius)
Parameters
Returns
Type | Description |
|---|---|
| float |
Remarks
Calculates the screen space distance from the mouse pointer to the disc section at given world space with the given and . The disc section is defined by from vector and the in degrees.
positionradiusnormalangleUses the current camera to determine the distance.
Additional Resources: HandleUtility.DistanceToDisc, HandleUtility.DistanceToCircle.