I want to make “invisible walls” in my sketch so that when you draw a trace with the mouse, it is blocked and the line is drawn around this form of “invisible walls”.
I tried with the p5 Play library but it works with sprites and I can’t use
line(); to draw a solid line. And i want to draw a solid line. I use
collide(); form p5 Play but i’m not sure it is the good way to do that.
Here is the result: https://editor.p5js.org/NicolasTilly/present/TECIwdmVU
and this is my code: https://editor.p5js.org/NicolasTilly/sketches/TECIwdmVU
Thank you for your help.