Q:

Bombs - Cocos2d/Box2d

I have a ball and a bomb. All I need to do is, when the ball collides with the bomb the bomb explodes pushing the ball away from the bomb in the opposite direction the ball was thrown in.
For instance, if the ball was thrown at a 45 degree angle and hits the bomb then, the bomb explodes and pushes the ball away from the bomb at a -45 degree angle.
Is that even possible? and if so could someone lead me in the right direction?

A:

It's possible. Implement your own b2ContactListener to find the bomb-ball collision. Then apply linear impulse to the ball according to it's and bomb positions.

