Skip to main content

Physics.OverlapSphere(PhysicSphere physicSphere)

Computes and stores colliders touching or inside the sphere.

Parameters:

NameTypeDescription
physicSpherePhysicSphereThe physic sphere. The direction field of the PhysicSphere will be ignored, so can be a nil.

Returns:

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

Usage

---@type PhysicSphere
local physicSphere;


local val0 = Physics:OverlapSphere(physicSphere)