reference / collision
touching
Whether two shapes touch, edges included: touching ball paddle.
ball = { pos: { 200, 150 }, radius: 40 }wall = { pos: { 220, 60 }, size: { 140, 30 } }if touching ball wall [ fill tomato ] else [ fill teal ]circle at ball.pos radius ball.radiusrect at wall.pos size wall.size fill 120
How to write it
touching a b
Gives true or false.