-
Notifications
You must be signed in to change notification settings - Fork 2
raylib.GetRayCollisionSphere
JoeStrout edited this page Apr 29, 2026
·
2 revisions
Get collision info between ray and sphere
| Parameter | Default Value | Note |
|---|---|---|
| ray | ||
| center | ||
| radius |
| Condition | Return Value |
|---|---|
| (always) | map |
ray = {position:[0,5,0], direction:[0,-1,0]}
rc = raylib.GetRayCollisionSphere(ray, [0,0,0], 1.5)
if rc.hit then
print "Hit sphere at distance: " + rc.distance
end if