Skip to content

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

Parameters

Parameter Default Value Note
ray
p1
p2
p3
p4

Return value

Condition Return Value
(always) map

Notes

Example

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

Clone this wiki locally