Skip to content

Api > Physics > SphereCastAll()


Physics.SphereCastAll(PhysicSphere physicSphere)⚓︎

Like Physics.SphereCast, but this function will return all hits the sphere sweep intersects.

Parameters:⚓︎

Name Type Description
physicSphere PhysicSphere The PhysicSphere to cast

Returns:⚓︎

type Description
RaycastHit[] An array of all colliders hit in the sweep.

Usage⚓︎

---@type PhysicSphere
local physicSphere;


local val0 = Physics:SphereCastAll(physicSphere)