HI,
I have developing one simple game for iphone using chipmunk and cocos2d in which my HERO is falling from top of the building. And to give falling effect i am using "ScaleTo" Action on sprite. Now, I want to detect the collision with moving object under the building. I am using chipmunk for collision detection. I have attached shape to both objects ( HERO and Moving object). But the problem is because HERO (which is falling down) and moving object sometimes gets into same x,y coordinate while ball is falling so chipmunk detects collision multiple times. I want collision to be detected once HERO reaches to bottom of building.
or what i want is when ScaleTo action finished than only, chipmunk should detect collision or execute collision logic.
I tried using BOOL flag which i am setting on ScaleTo callback and check that flag on collision (if its set than only perform action) but still chipmunk detect collision at-least twice.
I want to know that am I doing something wrong or is there any easier way to do show that HERO is falling and when it reaches bottom of the building it detects collision with other object.
Please help me on this. I am stuck with this. I would really appreciate.
Thanks
Sunflower