I seem to get a double notification when my SKSpriteNode hits has contact with the worldCategory, how come is this? This creates problem when i want to run an action when it touches the worldCategory, since the action is being triggered
Here is my bitmask in the InitWithSize method
mover.physicsBody.categoryBitMask = birdCategory;
bottom.physicsBody.categoryBitMask = worldCategory;
mover.physicsBody.contactTestBitMask = worldCategory;
and here is the contact method:
- (void)didBeginContact:(SKPhysicsContact *)contact {
if (contact.bodyA.categoryBitMask == worldCategory) {
mover.texture = [SKTexture textureWithImageNamed:@"birddead1"];
NSLog(@"Contact");
self.scene.paused = YES;
[pauseButton removeFromSuperview];
}
}
In my log there is being shown two lines with "Contact"