You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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]
Parameters
Parameter
Default Value
Note
point
p1
p2
threshold
Return value
Condition
Return Value
(always)
number
Notes
Example
// Check if a point is within 5 pixels of the linehit=raylib.CheckCollisionPointLine([205, 150], [100, 100], [300, 200], 5)
ifhitthenprint"Point is near the line!"