Why are didBeginContact called multiple times?

The reason why the didBeginContact is being fired multiple times is because you have multiple contact points happening on concave shapes.

If you look at the picture below, you will see I have 2 sprites, a black star and a red rectangle. When the black star hits the red rectangle, it hits it on multiple points, circled in blue. Sprite Kit will then do a call for each line intersection, so that the developer can use the contactPoint variable for each of these contacts.

enter image description here

Leave a Comment