0
votes

I am making a "shoot them up" game on my iPhone (with planes) and I want to detect a collision between my plane and an ennemy but without applying the physics on them.

If I juste detect the collision with a ContactListener, I can lower my plane's life but it will bounce back after the collision.

If I put my ennemies and my plane on the same fixture groupIndex, there will be no collision and I won't be able to lower my plane's life.

I have found questions like mine but still not answered. Can you help me ?? Thx

1

1 Answers

0
votes

I've found the trick !

All I had to do is to set the plane's fixture as a sensor.

myPlaneFixtureDef.isSensor = YES;