Api > Collider > ClosestPointOnBounds()
Collider.ClosestPointOnBounds(Vector3 position)⚓︎
The closest point to the bounding box of the attached collider.
Parameters:⚓︎
Name | Type | Description |
---|---|---|
position | Vector3 |
Returns:⚓︎
type | Description |
---|---|
Vector3 | closest point to the bounding box of the attached collider. |
Usage⚓︎
---@type Collider
local collider;
---@type Vector3
local position;
local val0 = collider.ClosestPointOnBounds(position)