Skip to content

raylib.GetRayCollisionBox

JoeStrout edited this page Apr 29, 2026 · 2 revisions

Get collision info between ray and box

Parameters

Parameter Default Value Note
ray
box

Return value

Condition Return Value
(always) map

Notes

Example

ray = {position:[0,5,0], direction:[0,-1,0]}
box = {min:[-1,-1,-1], max:[1,1,1]}
rc = raylib.GetRayCollisionBox(ray, box)
if rc.hit then
    print "Hit at distance: " + rc.distance
end if

Clone this wiki locally