Random and If Else help

you can just do a random rect and the check for collision / intersection

if we have a intersection, don’t draw it.

(please note that you use 2 points to define a rect but the code in the link uses x,y and w,h instead;
also get rid of rectMode(CENTER); )

2 Likes