I have “liquid” (a rectangle) into which I am dropping “objects” (ellipses) of a regular size. When an object passes into the water, I want to add to the height of the water rectangle, and when I take an object out, I want to subtract from it.
How do I count the number of objects in the water without the count value going up whenever void draw() loops?
Thank you!