Skip to main content

Rigidbody.ClosestPointOnBounds(Vector3 position)

The closest point to the bounding box of the attached colliders.

Parameters:

NameTypeDescription
positionVector3

Returns:

typeDescription
Vector3closest point to the bounding box of the attached colliders.

Usage

---@type Rigidbody
local rigidbody;

---@type Vector3
local position;


local val0 = rigidbody.ClosestPointOnBounds(position)