Search code examples
iosxcode7game-physicsscenekit

SceneKit collision didbegincontact change with Xcode 7


I have a SceneKit game that the character is set to collide and collect collectables within the game. This is done using the standard collision masks and was working perfectly until I updated to Xcode 7.

Now although the collision is happening the didbegincontact method is not being called.

Is there a change I missed to cause this? I have check the delegate declaration and reviewed changes made line by line.


Solution

  • You have to set contactTestBitMask too, I usually do this:

    b.contactTestBitMask = b.collisionBitMask