     }
     
     // MARK: -
+    
+    func addNewShip() {
+        let cubeNode = SCNNode(geometry: SCNBox(width: 0.1, height: 0.1, length: 0.1, chamferRadius: 0))
+        cubeNode.position = SCNVector3(0, 0, -0.5) // SceneKit/AR coordinates are in meters
+        cubeNode.physicsBody = SCNPhysicsBody(type: .dynamic, shape: SCNPhysicsShape(node: cubeNode, options: nil))
+        cubeNode.physicsBody?.isAffectedByGravity = false
+        cubeNode.physicsBody?.categoryBitMask = CollisionCategory.ship.rawValue
+        cubeNode.physicsBody?.contactTestBitMask = -1
+        sceneView.scene.rootNode.addChildNode(cubeNode)
+    }
+    
+    func removeNodeWithAnimation(_ node: SCNNode) {
+        node.removeFromParentNode()
+    }
     /*
     func getUserDirection() -> SCNVector3 {
         self.sceneView.session.currentFrame?.

    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 {
            print("HIT SHIP")
        }
    }
    

        sceneView.scene = scene
        sceneView.scene.physicsWorld.contactDelegate = self
        
        self.addNewShip()
        
    }
    
