public static DistanceToArc ( Vector3 center, Vector3 normal, Vector3 from, float angle, float radius ) : float | ||
center | Vector3 | |
normal | Vector3 | |
from | Vector3 | |
angle | float | |
radius | float | |
return | float |
public static float DistanceToDisc(Vector3 center, Vector3 normal, float radius) { Vector3 from = Vector3.Cross(normal, Vector3.up); if (from.sqrMagnitude < 0.001f) { from = Vector3.Cross(normal, Vector3.right); } return HandleUtility.DistanceToArc(center, normal, from, 360f, radius); }