In the didBegin
function below, one of the nodes has a category bit mask of 4294967295. However, this category is never assigned to any node.
Here are all the bit masks in use:
struct PhysicsCategory {
static let None : UInt32 = 0
static let All : UInt32 = UInt32.max
static let Player : UInt32 = 0b1 // 1
static let WorldBorder : UInt32 = 0b10 // 2
static let TopWorldBorder : UInt32 = 0b100 // 4
static let RightWorldBorder : UInt32 = 0b1000 // 8
static let Pellet : UInt32 = 0b10000
}
To repeat, the All
category, which corresponds to 4294967295, is never assigned to any node. So why is there a physics body with this category bit mask? Is this category bit mask ever implicitly assigned to a physics body?
func didBegin(_ contact: SKPhysicsContact) {
print("Collision was detected: \(contact.bodyA.categoryBitMask). \(contact.bodyB.categoryBitMask).")
}