ClosestPointCommand
Create a ClosestPointCommand using Instance ID of the Collider.
Read time 1 minuteLast updated 7 days ago
Definition
- Type: Constructor
- Namespace: UnityEngine
- Assembly: UnityEngine.PhysicsModule
ClosestPointCommand(Vector3, int, Vector3, Quaternion, Vector3)
Create a ClosestPointCommand using Instance ID of the Collider.
public ClosestPointCommand(Vector3 point, int colliderInstanceID, Vector3 position, Quaternion rotation, Vector3 scale)
Parameters
Location you want to find the closest point to.
The ID of the Collider that you find the closest point on.
The position of the Collider.
The rotation of the Collider.
The global scale of the Collider.
ClosestPointCommand(Vector3, Collider, Vector3, Quaternion, Vector3)
Schedule a batch of closest points which are performed in a job.
public ClosestPointCommand(Vector3 point, Collider collider, Vector3 position, Quaternion rotation, Vector3 scale)
Parameters
Location you want to find the closest point to.
The Collider that you find the closest point on.
The position of the Collider.
The rotation of the Collider.
The global scale of the Collider.
Remarks
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.