On page 86 is this line of code:
self.physicsBody?.contactTestBitMask = PhysicsCategory.player
| PhysicsCategory.foreground
On page 87 is this text:
Notice here that the contactTestBitMask is set to both the PhysicsCategory.player | PhysicsCategory.floor categories
The text references PhysicsCategory.floor
while the code references PhysicsCategory.foreground
. foreground
is what the code has referenced up until this line. I believe floor
may have been renamed to foreground
at some point and this reference didn’t get caught.