How to move a node to the position I touch in SpriteKit with Swift? <p>I am creating a game like Doodle Jump (without the accelerometer).</p> <p>I have been trying to figure this out, but I can't seem to make it run as smoothly as I've been hoping. </p> <p>Here is my code for my touches functions:</p> <pre><code>override func touchesBegan(touches: Set&lt;NSObject&gt;, withEvent event: UIEvent) { for touch: AnyObject in touches { let touchLocation = touch.locationInNode(self) lastTouch = touchLocation } } override func touchesMoved(touches: Set&lt;NSObject&gt;, withEvent event: UIEvent) { for touch: AnyObject in touches { let touchLocation = touch.locationInNode(self) lastTouch = touchLocation } } override func touchesEnded(touches: Set&lt;NSObject&gt;, withEvent event: UIEvent) { lastTouch = nil } override func update(currentTime: CFTimeInterval) { if let touch = lastTouch { let impulseVector = CGVector(dx: 400, dy: 400) player.physicsBody?.applyImpulse(impulseVector) } } </code></pre>