public static ClosestPointToArc ( Vector3 center, Vector3 normal, Vector3 from, float angle, float radius ) : Vector3 | ||
center | Vector3 | |
normal | Vector3 | |
from | Vector3 | |
angle | float | |
radius | float | |
리턴 | Vector3 |
public static Vector3 ClosestPointToArc(Vector3 center, Vector3 normal, Vector3 from, float angle, float radius)
{
Vector3[] dest = new Vector3[60];
Handles.SetDiscSectionPoints(dest, 60, center, normal, from, angle, radius);
return ClosestPointToPolyLine(dest);
}
public static Vector3 ClosestPointToDisc(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.ClosestPointToArc(center, normal, from, 360f, radius); }