collide_circle_poly
collide_circle_poly(cx, cy, r, points, interior)
Return true/false after testing collision between a circle and a polygon
Syntaxe
var contact = collide_circle_poly( cx=10,cy=10,r=100, points=[ ... ] )
Arguments
| Name | Required | Default | Description |
|---|---|---|---|
cx | yes | - | center x of circle |
cy | yes | - | center y of circle |
r | yes | - | radius of circle |
points | yes | - | list of points [x1,y1,x2,y2...] |
interior | yes | - | check if circle center inside polygon counts as collision |