
-----------------------------------
Junaid2pac
Sat Jan 19, 2008 12:25 pm

Collision effect
-----------------------------------
i have a game in which a ball is thrown and it hits a circulat object which is also moving (circular object is drawn by: e.drawOval();))
i also have a background in the back...now how would i make the circular object dissapear when the ball hits the circular object...
Note: I have already done the math for collision detection.

-----------------------------------
HellblazerX
Sat Jan 19, 2008 2:20 pm

Re: Collision effect
-----------------------------------
You could use a boolean to keep track of whether or not you need to draw the ball.
if (notHit) {
     e.drawOval ();
}

and when your collision occurs, just set the boolean to false, and you won't draw the ball anymore
