title: CCSprite Follow User Touch
body: <p>So far, I have made my <code>CCSprite</code> move to the location of the user's touch on the screen using <code>CCActionMoveTo</code>, however I have only got it to work when the user simply taps. </p>
  
  <p>I would like the CCSprite to move when the user drags their finger, instead of just tapping and moving along with the ability to change direction as the user drags changes direction - I am fairly new to cocos2d and have search for similar questions but have been unable to find any. I have posted my code below:</p>
  
  <pre><code>- (id)init
  {
      self = [super init];
      if (!self) return(nil);
      self.userInteractionEnabled = YES;
      // Player sprite
      _playerSprite = [CCSprite spriteWithImageNamed:@"PlayerSprite.png"];
      _playerSprite.scale = 0.5;
      _playerSprite.position  = ccp(self.contentSize.width/2, 150);
      [self addChild:_playerSprite];
      return self;
  }
  
  -(void) touchBegan:(UITouch *)touch withEvent:(UIEvent *)event {
      CGPoint touchLoc = [touch locationInNode:self];
      CCActionMoveTo *actionMove = [CCActionMoveTo actionWithDuration:0.2f position:ccp(touchLoc.x, 150)];
      [_playerSprite runAction:actionMove];
  }
  </code></pre>