I need to find the edges of the circle rather than the center point for collision
I've been presuming i need to make an object of an oval so i can the .getBounds and see if it intersects
something like this which i found online
Rectangle r1 = rect1.getBounds();
Rectangle r2 = rect2.getBounds();
if (r1.intersects(r2))
collision = true;
else
collision = false;
but im not quite sure how to go about making an oval object for starters (do i need to make my own class for this?), im sorry if i havent explained it too well as im fairly new with java.
Thanks

New Topic/Question
Reply




MultiQuote









|