format
typescript
Rigidbody.ClosestPointOnBounds(position)class: Rigidbody
description
Returns the squared distance and coordinates of the point on the closest Rigidbody bounding box to the specified point.
This method can be used to get the closest point on a Rigidbody bounding box to a given point. It is particularly useful for performing collision detection or trigger detection operations. Typically, you would pass the point you want to check to this method and get the closest point on the Rigidbody bounding box.
parameter
| param_name | type | description |
|---|---|---|
| position | Vector3 | The specified point. |
reture
| type | description |
|---|---|
ClosestPoint | The squared distance and coordinates. |
