Skip to content

Api > Physics > OverlapSphere()


Physics.OverlapSphere(PhysicSphere physicSphere)⚓︎

Computes and stores colliders touching or inside the sphere.

Parameters:⚓︎

Name Type Description
physicSphere PhysicSphere The physic sphere. The direction field of the PhysicSphere will be ignored, so can be a nil.

Returns:⚓︎

type Description
Collider[] An array with all colliders touching or inside the sphere.

Usage⚓︎

---@type PhysicSphere
local physicSphere;


local val0 = Physics:OverlapSphere(physicSphere)