title: How to make a sprite move on touchesEnd?
body: <p>Here is a video I recorded with the problem visually
  <a href="https://www.youtube.com/watch?v=AC-4c4Qcyeo&amp;feature=youtu.be" rel="nofollow">https://www.youtube.com/watch?v=AC-4c4Qcyeo&amp;feature=youtu.be</a></p>
  
  <p>Currently facing a bug after when tocuhesMoved drag line path is completed I want the sprite to move to the position that the last place where the touch was. However you can touch anywhere on the UIView and it will move to that loaction without using the touchesMoved drag line. How do I only make the sprite move to the location only using the drag line mechanic to move the sprite?</p>
  
  <pre><code>- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event
  {
  NSLog(@"Moving");
  if ([touches count]) {
  UITouch* touch = [touches anyObject];
  CGPoint position = [touch locationInNode:self];
  
  path = CGPathCreateMutable();
  
  CGPathMoveToPoint(path, NULL, position.x, position.y);
  
  CGPathAddLineToPoint(path, NULL, blade.position.x, blade.position.y);
  
  //test points
  //NSLog(@"%f", position.x);
  //NSLog(@"%f", position.y);
  
  self.line2.path = path;
    }
  
  }
  </code></pre>
  
  <p>TouchesEnded~~~~~</p>
  
  <pre><code>-(void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event
  {
  
  [self.line2 removeFromParent];
  
    if ([touches count]) {
       [blade runAction:[SKAction moveTo:[[touches anyObject]locationInNode:self]duration:0.21]];
    }
  }
  </code></pre>