Hello Processing and p5.js community!
I am having difficulty understanding how to detect when two rotated polygons have collided using the p5.collide2D library. Although my shapes are Rects I have tried to convert them into polygons and rotate them with p5.Vector.rotate() as suggested by this post and based on documentation from the Collision Detection for Processing guide.
I know that my method of making polygons 1 and 2 isn’t ideal but it was the best way for me to wrap my head around converting the Rects to vertexes.
How can I detect if these two rotated polygon objects have touched?
Ultimately my goal is to create a sketch with many rotated (rectangular) polygons, lines and circles and delete the polygons that overlap so that none of them touch.
Apologies if it would have been better to continue the other thread instead of making a this one. Thanks for your help!