Version: 2022.2
언어: 한국어
public static Vector3 ClosestPoint (Vector3 point, Collider collider, Vector3 position, Quaternion rotation);

파라미터

point Location you want to find the closest point to.
collider The collider that you find the closest point on.
position The position of the collider.
rotation The rotation of the collider.

반환

Vector3 The point on the collider that is closest to the specified location.

설명

Returns a point on the given collider that is closest to the specified location.

Note that in case the specified location is inside the collider, or exactly on the boundary of it, the input location is returned instead.

The collider can only be BoxCollider, SphereCollider, CapsuleCollider or a convex MeshCollider.

See Also: ClosestPoint.