title: Getting Sprite To Move Slowly Toward Touch
body: <p>I'm trying to have the "player" sprite move slowly toward touches on the screen. The code that I have now moves the sprite immediately to where the touch happens on the screen. Here is my current code. Thanks!</p>
  
  <pre><code>    //
  //  GameScene.swift
  //  testing
  //
  //  Created by Matthew Jahnes on 7/3/18.
  //  Copyright © 2018 Matthew Jahnes. All rights reserved.
  //
  
  import SpriteKit
  import GameplayKit
  
  class GameScene: SKScene {
  
      var player = SKSpriteNode()
  
  
      override func didMove(to view: SKView) {
          self.anchorPoint = CGPoint(x:0.5, y:0.5)
  
  
          player = SKSpriteNode(color: UIColor.red, size: CGSize(width: 90, height:90))
          player.position = CGPoint(x:0, y:0)
          self.addChild(player)
  
  
  }
     override func touchesBegan(_ touches: Set&lt;UITouch&gt;, with event: UIEvent?) {
  
      for touch in touches {
          let location = touch.location(in: self)
  
          player.position.x = location.x
          player.position.y = location.y
  
      }
  }
  
  
  override func update(_ currentTime: TimeInterval) {
      // Called before each frame is rendered
  }
  </code></pre>
  
  <p>}</p>