Skip to content Skip to sidebar Skip to footer

Cant Get Rect.intersects(rec, Rec2) To Work

For some reason my program won't get through Rect.intersects(re,hitcore). If I use System.out.println()re.flattenToString(), I see that the two rectangles intersect but it won't re

Solution 1:

I figured it out. I was setting up rectangle using x,y and width,height. The actual parameters are the top left corner coordinate and bottom right corner coordinate.

 rect.set(x1,y1,x2,y2);

Post a Comment for "Cant Get Rect.intersects(rec, Rec2) To Work"