With help from here I have made a circle body traverse a given path. I have some bodies at some of the path points and have logged contact in didBeginContact
. When
It seems like when you change the firstBody
to a rectangle (in the didBeginContact
method), you don't set the bit mask. From what you described, it appears you want to set it to circleCategory
as such:
firstBody.node!.physicsBody?.categoryBitMask = circleCategory
I would put this right below the firstBody.node!.physicsBody?.allowsRotation = false
.