-
Notifications
You must be signed in to change notification settings - Fork 2
raylib.CheckCollisionPointLine
JoeStrout edited this page Apr 29, 2026
·
2 revisions
Check if point belongs to line created between two points [p1] and [p2] with defined margin in pixels [threshold]
| Parameter | Default Value | Note |
|---|---|---|
| point | ||
| p1 | ||
| p2 | ||
| threshold |
| Condition | Return Value |
|---|---|
| (always) | number |
// Check if a point is within 5 pixels of the line
hit = raylib.CheckCollisionPointLine([205, 150], [100, 100], [300, 200], 5)
if hit then print "Point is near the line!"