Hey am trying to find different ways to get hit detection but finding it hard to figure out how to get it with an oval here is what i have just now,
wondering if they are a similar way to do this -
public cpuMovement(int x, int y, int width, int height){
this.x = x;
this.y = y;
this.width = width;
this.height = height;
this.rect = new Rectangle(x, y, width, height);
}
public static void Collision(cpuMovement cm){
for (int i = 0; i < Physics.cpuMove.size(); i++) {
if(Physics.cpuMove.get(i).getRect().intersects(cm.getRect())){
if(Physics.cpuMove.get(i) != cm){
System.out.println(“Working”);
}
}
}
}
The top bit of code is working but how would i get an oval hit detection
Cheers for your time