Version: 2023.2

ClosestPointCommandConstructor

切换到手册
public ClosestPointCommand (Vector3 point, int colliderInstanceID, Vector3 position, Quaternion rotation, Vector3 scale);

参数

point 您需要找到最接近点所对应的位置。
colliderInstanceID The ID of the Collider that you find the closest point on.
position The position of the Collider.
rotation The rotation of the Collider.
scale The global scale of the Collider.

描述

Create a ClosestPointCommand using Instance ID of the Collider.


public ClosestPointCommand (Vector3 point, Collider collider, Vector3 position, Quaternion rotation, Vector3 scale);

参数

point 您需要找到最接近点所对应的位置。
collider The Collider that you find the closest point on.
position The position of the Collider.
rotation The rotation of the Collider.
scale The global scale of the Collider.

描述

Schedule a batch of closest points which are performed in a job.

Can only be invoked from the main thread, since Unity Components are unavailable off the main thread. In the threaded context, use the other constructor that accepts Instance ID instead.