How to intersect a oval and a rect ?
I am making a pong game , and have got it to work.
But to detect collision im using
private boolean collision() {
return game.racquet.getBounds().intersects(getBounds());
}
public Rectangle getBounds() {
return new Rectangle(x, y, DIAMETER, DIAMETER);
}
As you can see by the getBounds() the ball is made into a rectangle.
This means that sometime it looks like the ball will miss the paddle but it actuly hits because its a rectangle.
Is there anyway around this?