I have two separate objects in Java, Object1 and Object2, both are the same size and square. For each object I can get the x and y coordinates. What I need to do is check if Object1 is within a certain distance of Object2. That distance is within 32 points on both the X and Y axis.
once the condition has been met then I can run my code. e.g.
if ( check condition ) {
//my code here
}
Try the following: