-
Notifications
You must be signed in to change notification settings - Fork 2
raylib.GetRayCollisionBox
JoeStrout edited this page Apr 29, 2026
·
2 revisions
Get collision info between ray and box
| Parameter | Default Value | Note |
|---|---|---|
| ray | ||
| box |
| Condition | Return Value |
|---|---|
| (always) | map |
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