diff --git a/ARViewer/ViewController.swift b/ARViewer/ViewController.swift index 9c178e2..3c8c600 100644 --- a/ARViewer/ViewController.swift +++ b/ARViewer/ViewController.swift @@ -133,6 +133,11 @@ class ViewController: UIViewController, ARSCNViewDelegate, SCNPhysicsContactDele bulletsNode.physicsBody?.applyForce(bulletDirection, asImpulse: true) sceneView.scene.rootNode.addChildNode(bulletsNode) + DispatchQueue.main.asyncAfter(deadline: .now() + 10, execute: { + print("removing bullet") + self.removeNodeWithAnimation(bulletsNode, explosion: false) + }) + } // MARK: - Game Functionality