Skip to main content

CapsuleCollider.ClosestPoint(Vector3 position)

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

Parameters:

NameTypeDescription
positionVector3Location you want to find the closest point to.

Returns:

typeDescription
Vector3The point on the collider that is closest to the specified location.

Usage

---@type CapsuleCollider
local capsulecollider;

---@type Vector3
local position;


local val0 = capsulecollider.ClosestPoint(position)