Overlapping Shapes
I'm creating a sketch where multiple ellipse objects created in a for() loop can be dragged around & dropped onto each other into a stack. When one object is dragged over another it grows larger and snaps to the same x&y position.
I've got it working as far as the dragging and overlap-checking goes, however when an object overlaps one that has been created earlier it jumps on top of it, hiding it(because it grows larger) . Is there a way to set the depth of an object without using transform/anything else that would require me to change my sketch to P3D etc?
- I've just spotted the header in the processing.js page - this is almost what I am trying to achieve, except that I would like to be able to drag the object out of the 'stack' again & I'd rather not just rip off this example.
Any suggestions? - I only discovered dist() and angleBetween() today so I might just be missing YET ANOTHER fundamental function. Thanks, L.