I have a sprite that i initialized as a SKSPriteNode bouncing continuously off another sprite also initialized the same way.
I can't figure out collision between the two, and nothing on stack has helped so far.
I have this set up to move the sprite using gravity.
self.physicsWorld.gravity = CGVector(dx: 0.0, dy: -2.0)
self.physicsWorld.contactDelegate = self
this is how I'm trying to check
if bounceHex.physicsBody?.collisionBitMask ==
collider.physicsBody?.collisionBitMask
{
score = score+1
print(score)
}
nothing happens with this code. I only want the score to increase with each bounce