SphereCheck||doc136434

September 20, 2022

Format

Map:SphereCheck(center, radius)

Describe

Get whether the ball shape detection has hit. Better performance thanMap:SphereCast()

parameter

Variable name Type Describe
center Vector3 Spherical center point
radius float Spherical radius

Return value

Type Describe
bool Detect whether it hits

Code example

Check the current scene coordinates (0,0,0) at the client, and check whether a ball shape per unit volume hits the collision body

local map = World.CurMap
local center = Vector3.new(0,0,0)
local radius = 0.5
local check = map:SphereCheck(center, radius)
print(check)