Skip to content

raylib.CheckCollisionPointPoly

JoeStrout edited this page Apr 29, 2026 · 2 revisions

Check if point is within a polygon described by array of vertices NOTE: Based on http://jeffreythompson.org/collision-detection/poly-point.php

Parameters

Parameter Default Value Note
point
points

Return value

Condition Return Value
(always) list

Notes

Example

poly = [[100,50], [200,50], [250,150], [150,200], [50,150]]
hit = raylib.CheckCollisionPointPoly([150, 120], poly)
if hit then print "Point is inside the polygon!"

Clone this wiki locally