I am having some trouble peforming an overlap test on a axis aligned bounding box.
Here is my code
public boolean overlapps(AABB other) {
return false;
}
}
I don't know how to implement this method.
Here is what I tried
public boolean overlapps(AABB other) {
if(min.x <= other.max.x && max.x >= other.min.x) {
if(min.y <= other.max.y && max.y >= other.min.y) {
if(min.z <= other.max.z && max.z >= other.min.z) {
return true;
}
}
}
return false;
}