-
Notifications
You must be signed in to change notification settings - Fork 2
raylib.CheckCollisionRecs
JoeStrout edited this page Apr 29, 2026
·
2 revisions
Check collision between two rectangles
| Parameter | Default Value | Note |
|---|---|---|
| rec1 | ||
| rec2 |
| Condition | Return Value |
|---|---|
| (always) | number |
player = {x:100, y:100, width:50, height:50}
enemy = {x:130, y:120, width:50, height:50}
if raylib.CheckCollisionRecs(player, enemy) then print "Collision detected!"