0
votes
1answer
304 views

cocos2d collision detection between two ccsprites i am using boundingBox but this method is not working [closed]

I am making a cocos2d side scroller and I am currently putting collision detection in. I have an enemy that shoots at the player. I want to have the bullets disappear when they hit the player. The ...
2
votes
2answers
1k views

Issue with removing sprites on collision

I'm trying to make a very simple collision detection procedure just for test purposes. The problem is with the send/receive information between functions I have these lines on the update method ...
0
votes
1answer
141 views

CCSprite x and y comparison

I have 2 CCSprites and I want to tell if their x and y are equal I tried this: if(sam.position.x == tom.position.x && sam.position.y == tom.position.y){ NSLog(@"Hooray!"); } Although I do ...
0
votes
1answer
352 views

Keep running CGRectIntersect Method - Objective C

I have two UIImageViews. mainSprite, and enemy1. And I have a method that makes enemy1 start moving towards mainSprite. So here's that method. -(void)enemy1Aggro{ if ...
8
votes
4answers
4k views

Cocos2D collision detection against a random shape

I would like to brainstorm a few ways of handling how to detect a collision between a sprite and a user generated shape of some sort. For example. There are 3 objects on the screen. The user takes ...