Rory Harvey
Rory Harvey

Reputation: 2616

CGRectIntersectsRect for cocos2d Android

I'm currently trying to test for collisions between two CGRects. Usually in Objective C I'd use the CGRectIntersectsRect method, but in Coso2d Android the only method available seems to be CGRect.containsRect which doesn't work as desired. Is there another way this must be done for Android?

Upvotes: 0

Views: 504

Answers (2)

rajpara
rajpara

Reputation: 5203

I found intersects method in CGRect at github repo use that function to check intersect of two rect.

I also found one issue logged with the same and there is also a solution mention.

Upvotes: 1

Rory Harvey
Rory Harvey

Reputation: 2616

Downloaded an updated version of the .jar file which contains a CGRect.intersects method

Upvotes: 0

Related Questions