-
Notifications
You must be signed in to change notification settings - Fork 2
raylib.GetRayCollisionQuad
JoeStrout edited this page Apr 29, 2026
·
2 revisions
Get collision info between ray and quad NOTE: The points are expected to be in counter-clockwise winding
| Parameter | Default Value | Note |
|---|---|---|
| ray | ||
| p1 | ||
| p2 | ||
| p3 | ||
| p4 |
| Condition | Return Value |
|---|---|
| (always) | map |
ray = {position:[0,5,0], direction:[0,-1,0]}
p1 = [-1,0,-1]
p2 = [-1,0,1]
p3 = [1,0,1]
p4 = [1,0,-1]
rc = raylib.GetRayCollisionQuad(ray, p1, p2, p3, p4)
if rc.hit then
print "Hit quad at: " + rc.point
end if