Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

I have an animated bomb sprite in my game and use CGRect for collision detection:

for (CCSprite bomb : _bombs) {
        CGRect bombRect = CGRect.make(bomb.getPosition().x - (scaleFactor * bomb.getContentSize().width),
                bomb.getPosition().y - (bomb.getContentSize().height),
                scaleFactor * bomb.getContentSize().width,
                scaleFactor * bomb.getContentSize().height);

        if (CGRect.intersects(playerRect, bombRect))

Is it possible to make the collision detection only work on the explosion frames in my bomb animation? I want the bomb sprite to be harmless before explosion.

share|improve this question
can you more elaborate your query ? –  A M Sep 17 '13 at 6:03
add comment

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.