title: *Collision* through bitmasks
body: <p>I am trying to not get contact with caveman and other images with collision bitmasks but my caveman hits everything.</p>
  
  <pre><code>func addCaveManBitMasks(){
  
      caveManNode.physicsBody?.categoryBitMask = PhysicsCategory.caveman
      caveManNode.physicsBody?.contactTestBitMask = PhysicsCategory.tri | PhysicsCategory.trex | PhysicsCategory.newblock |  PhysicsCategory.fireBall | PhysicsCategory.waterblock | PhysicsCategory.secondwaterblock | PhysicsCategory.star
      caveManNode.physicsBody?.collisionBitMask = PhysicsCategory.newblock
  }
  func addTriBitMasks(){
  
      triImage.physicsBody?.categoryBitMask = PhysicsCategory.tri
      triImage.physicsBody?.contactTestBitMask =  PhysicsCategory.caveman
      triImage.physicsBody?.collisionBitMask = 0
  }
  func addRexBitMasks(){
      tRexImage.physicsBody?.categoryBitMask = PhysicsCategory.trex
      tRexImage.physicsBody?.contactTestBitMask =  PhysicsCategory.caveman
      tRexImage.physicsBody?.collisionBitMask = 0
  }
  func addNewBlockManBitMasks(){
      newBlockImageNode.physicsBody?.categoryBitMask = PhysicsCategory.newblock
      newBlockImageNode.physicsBody?.contactTestBitMask = PhysicsCategory.caveman | PhysicsCategory.steg
      newBlockImageNode.physicsBody?.collisionBitMask = PhysicsCategory.caveman
  }
  func addFireBallBitMasks(){
      fireBall.physicsBody?.categoryBitMask = PhysicsCategory.fireBall
      fireBall.physicsBody?.contactTestBitMask = PhysicsCategory.caveman
      fireBall.physicsBody?.collisionBitMask = 0
  }
  func addStarBitMasks(){
      onScreenStar.physicsBody?.categoryBitMask = PhysicsCategory.star
      onScreenStar.physicsBody?.contactTestBitMask = PhysicsCategory.caveman
      onScreenStar.physicsBody?.collisionBitMask = 0
  }
  
  
  struct PhysicsCategory {
  
      static let caveman: UInt32 = 0x1 &lt;&lt; 0
      static let tri: UInt32 = 0x1 &lt;&lt; 1
      static let trex: UInt32 = 0x1 &lt;&lt; 2
      static let fireBall: UInt32 = 0x1 &lt;&lt; 3
      static let steg: UInt32 = 0x1 &lt;&lt; 4
      static let ptero: UInt32 = 0x1 &lt;&lt; 5
      static let waterblock: UInt32 = 0x1 &lt;&lt; 6
      static let secondwaterblock: UInt32 = 0x1 &lt;&lt; 7
      static let newblock: UInt32 = 0x1 &lt;&lt; 8
      static let star: UInt32 = 0x1 &lt;&lt; 9
      static let food: UInt32 = 0x1 &lt;&lt; 10
  
  
  }
  </code></pre>
  
  <p>the tri, rex, fireball, and newblock don't contact with one another which is perfect, but I also need the caveman to do the same. Caveman should only <em>collide</em> with the new block which it does. I am very confused and an explanation would be much appreciated </p>