Set up proper contactTestBitMask
and collisionBitMask
for Brick
and Bullet
.
For some reasons you have collisionBitMask
set to 0x0
, which means that node will not collide with any object at all.
Also, you have specified a wrong categoryBitMask
for Brick
(the same as for Bullet
). You should create a separate category for it:
bullet.physicsBody.categoryBitMask = kShipFiredBulletCategory;
bullet.physicsBody.contactTestBitMask = kBrickCategory;
bullet.physicsBody.collisionBitMask = kBrickCategory;
rebote.physicsBody.categoryBitMask = kBrickCategory;
rebote.physicsBody.contactTestBitMask = kShipFiredBulletCategory;
rebote.physicsBody.collisionBitMask = kShipFiredBulletCategory;