When the ball collides with the cup, the score should increase by 1. However it currently increases by 1, 3 or sometimes 4 which means the collision is being detected multip
this happened to me, what to do is simple, just define everything like this each node needs one: first make this for the nodes, either if its a screen border or what ever node it hits, say this:
let nodesCatergory : UInt32 = 0x1 << 1
after, put this nodesCatergory to everynode you have in game, or the nodes that it collides with, then add it like this:
if firstBody.categoryBitMask == ballCategory && secondBody.categoryBitMask == nodesCatergory {
//score++
println("point scored, NOT!")
//moveBall() //Move ball back to start position
}
thats it! you can do these till the desired effect is acquired!