Skip to content

raylib.CheckCollisionBoxSphere

JoeStrout edited this page Apr 29, 2026 · 2 revisions

Check collision between box and sphere

Parameters

Parameter Default Value Note
box
center
radius

Return value

Condition Return Value
(always) number

Notes

Example

box = {min:[-1,-1,-1], max:[1,1,1]}
center = [2, 0, 0]
radius = 0.8
hit = raylib.CheckCollisionBoxSphere(box, center, radius)
if hit then print "Box and sphere overlap!" else print "No collision."

Clone this wiki locally