BoxCheck||doc136433

September 20, 2022

Format

Map:BoxCheck(center, extend, Direction)

Describe

Get whether the box detection has hit. Better performance thanMap:BoxCast()

parameter

Variable name Type Describe
center Vector3 Box center point
extend Vector3 Side length of box type
Direction Vector3 The rotation direction of the box type is vector3 by default Zero

Return value

Type Describe
bool Detect whether it hits

Code example

On the client side, check whether the current scene coordinates (0,0,0) a box type per unit volume has hit the collision body

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