文档

Unity Engine

Unity Engine

DistanceToDisc(Vector3, Vector3, float)

Returns the distance in pixels from the mouse pointer to a 3D disc.
阅读时间1 分钟最后更新于 1 个月前

Definition

  • Type: Method
  • Namespace: UnityEditor
  • Assembly: UnityEditor.CoreModule
public static float DistanceToDisc(Vector3 center, Vector3 normal, float radius)

Parameters

center


normal


radius

Returns

Type

Description

float

Remarks

Calculates the screen space distance from the mouse pointer to the disc (circle) at given world space
position
with the given
radius
and
normal
.
Uses the current camera to determine the distance.
Additional Resources: HandleUtility.DistanceToCircle.