Skip to content

raylib.CheckCollisionCircleRec

JoeStrout edited this page Apr 29, 2026 · 2 revisions

Check collision between circle and rectangle NOTE: Reviewed version to take into account corner limit case

Parameters

Parameter Default Value Note
center
radius
rec

Return value

Condition Return Value
(always) number

Notes

Example

box = {x:50, y:50, width:200, height:150}
hit = raylib.CheckCollisionCircleRec([160, 120], 40, box)
if hit then print "Circle overlaps the rectangle!"

Clone this wiki locally