So I have a bouncing rectangle on the bottom on the screen which code is in the void draw. I also have randomly falling ellipses which code is in the class meteor and under void fall(). I want to have a detection so when a falling ellipse hits the bouncing rectangle it does something I want to.
First I know how to do two rectangles but I do not know what the detection rules are for hitting the rectangle. I do know however that the equation should end up using their speeds somewhere for collision detection as it is a moving object. The issue is the ellipses speed is under void fall and part of the class meteor.
If I try to call the speed of the ellipse it will not recognize y (the speed) because it is under its own separate class. So basically this and I don’t know how to calculate the detection for a rectangle and ellipse hitting. I hope that makes sense.