     }
     
     func removeNodeWithAnimation(_ node: SCNNode, explosion: Bool) {
+        
+        // Play collision sound for all collisions (bullet-bullet, etc.)
+        
+        do
+        {
+            let MusicURL = Bundle.main.path(forResource: "collision", ofType: "mp3")
+            try Player = AVAudioPlayer(contentsOf: NSURL (fileURLWithPath:MusicURL!) as URL)
+            Player.prepareToPlay()
+            Player.play()
+        }
+        catch let error as NSError {
+            print(error.description)
+        }
+        
         if explosion {
             
-            do
-            {
-                let MusicURL = Bundle.main.path(forResource: "collision", ofType: "mp3")
-                try Player = AVAudioPlayer(contentsOf: NSURL (fileURLWithPath:MusicURL!) as URL)
-                Player.prepareToPlay()
-                Player.play()
-            }
-            catch let error as NSError {
-                print(error.description)
-            }
-            
-            let particleSystem = SCNParticleSystem(named: "explosion", inDirectory: nil)
-            let systemNode = SCNNode()
-            systemNode.addParticleSystem(particleSystem!)
-            // place explosion where node is
-            systemNode.position = node.position
-            sceneView.scene.rootNode.addChildNode(systemNode)
-        }
-        
-        // remove node
-        node.removeFromParentNode()
-    }
-    
-    func getUserVector() -> (SCNVector3, SCNVector3) { // (direction, position)
-        if let frame = self.sceneView.session.currentFrame {
-            let mat = SCNMatrix4(frame.camera.transform) // 4x4 transform matrix describing camera in world space
-            let dir = SCNVector3(-1 * mat.m31, -1 * mat.m32, -1 * mat.m33) // orientation of camera in world space
-            let pos = SCNVector3(mat.m41, mat.m42, mat.m43) // location of camera in world space
-            
-            return (dir, pos)
-        }
-        return (SCNVector3(0, 0, -1), SCNVector3(0, 0, -0.2))
-    }
-    
-    func floatBetween(_ first: Float,  and second: Float) -> Float { // random float between upper and lower bound (inclusive)
-        return (Float(arc4random()) / Float(UInt32.max)) * (first - second) + second
-    }
-    
-    // MARK: - Contact Delegate
-    
-    func physicsWorld(_ world: SCNPhysicsWorld, didBegin contact: SCNPhysicsContact) {
-        //print("did begin contact", contact.nodeA.physicsBody!.categoryBitMask, contact.nodeB.physicsBody!.categoryBitMask)
-        if contact.nodeA.physicsBody?.categoryBitMask == CollisionCategory.ship.rawValue || contact.nodeB.physicsBody?.categoryBitMask == CollisionCategory.ship.rawValue { // this conditional is not required--we've used the bit masks to ensure only one type of collision takes place--will be necessary as soon as more collisions are created/enabled
+            // Play explosion sound for bullet-ship collisions
             
             do
             {

    
    @IBAction func didTapScreen(_ sender: UITapGestureRecognizer) { // fire bullet in direction camera is facing
        
        do
        {
            let MusicURL = Bundle.main.path(forResource: "torpedo", ofType: "mp3")

                print(error.description)
            }
            
            let particleSystem = SCNParticleSystem(named: "explosion", inDirectory: nil)
            let systemNode = SCNNode()
            systemNode.addParticleSystem(particleSystem!)
            // place explosion where node is
            systemNode.position = node.position
            sceneView.scene.rootNode.addChildNode(systemNode)
        }
        
        // remove node
        node.removeFromParentNode()
    }
    
    func getUserVector() -> (SCNVector3, SCNVector3) { // (direction, position)
        if let frame = self.sceneView.session.currentFrame {
            let mat = SCNMatrix4(frame.camera.transform) // 4x4 transform matrix describing camera in world space
            let dir = SCNVector3(-1 * mat.m31, -1 * mat.m32, -1 * mat.m33) // orientation of camera in world space
            let pos = SCNVector3(mat.m41, mat.m42, mat.m43) // location of camera in world space
            
            return (dir, pos)
        }
        return (SCNVector3(0, 0, -1), SCNVector3(0, 0, -0.2))
    }
    
    func floatBetween(_ first: Float,  and second: Float) -> Float { // random float between upper and lower bound (inclusive)
        return (Float(arc4random()) / Float(UInt32.max)) * (first - second) + second
    }
    
    // MARK: - Contact Delegate
    
    func physicsWorld(_ world: SCNPhysicsWorld, didBegin contact: SCNPhysicsContact) {
        //print("did begin contact", contact.nodeA.physicsBody!.categoryBitMask, contact.nodeB.physicsBody!.categoryBitMask)
        if contact.nodeA.physicsBody?.categoryBitMask == CollisionCategory.ship.rawValue || contact.nodeB.physicsBody?.categoryBitMask == CollisionCategory.ship.rawValue { // this conditional is not required--we've used the bit masks to ensure only one type of collision takes place--will be necessary as soon as more collisions are created/enabled
            
            print("Hit ship!")
            self.removeNodeWithAnimation(contact.nodeB, explosion: false) // remove the bullet
            self.userScore += 1
