Hi,
I would like to know how do I detect the center point of the first object collide with the center point of the second object? Coz the following code only shows any side of the object touches the other one. Any help would be thankful.
I would like to know how do I detect the center point of the first object collide with the center point of the second object? Coz the following code only shows any side of the object touches the other one. Any help would be thankful.
Code:
if (CGRectIntersectsRect(box1.frame, ball.frame) && soundCounter==1){
CGPoint newCenter = CGPointMake(-50, -50);
box1.center = newCenter;
[box1 removeFromSuperview];
}