title: SKPhysicsContact is there any way to determine which body is A and B?
body: <p>in SpriteKit we detect the in the didBeginContact method.
  but this looks a bit stupid to do something like that:
  func didBeginContact(contact: SKPhysicsContact) {</p>
  
  <pre><code>    if let contactA = contact.bodyA.node?.name {
  
          if let contactB = contact.bodyB.node?.name {
  
              //now that we have safely unwrapped these nodes, we can operate on them
  
              if contactA == "ball" {
  
                  collisionBetweenBall(contact.bodyA.node!, object: contact.bodyB.node!)
  
              } else if contactB == "ball" {
  
                  collisionBetweenBall(contact.bodyB.node!, object: contact.bodyA.node!)
  
              }
  
          }
  
      }
  
  }
  </code></pre>
  
  <p>is there any way I can ensure that bodyA is always a ball? is there any rules related to categorybitmask?</p>