Version: 5.6

HandleUtility.ClosestPointToDisc

Cambiar al Manual
public static Vector3 ClosestPointToDisc (Vector3 center, Vector3 normal, float radius);

Descripción

Get the point on an disc (in 3D space) which is closest to the current mouse position.

This function takes the disc defined by its parameters and "flattens" it into screen space. The closest point between the flattened disc and the current mouse position (also in screen space) is then found and converted back into a 3D point on the original 3D disc. This is useful for Handle GUIs that involve rotation of an object around the center of the disc; the 2D mouse movements are converted into 3D space in the familiar way used by Unity's built-in tools.

Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961