title: SpriteKit Rotate Sprite depending on touch location
body: <p>I have a sprite which I can drag across the screen. My question is how to make it also to rotate automatically.</p>
  
  <pre><code>- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event
  {
      if(_dead)
          return;
  
      NSArray *touchArray=[touches allObjects];
   if ([touchArray count] == 1)
      {
          [_player runAction:[SKAction moveTo:[[touches anyObject] locationInNode:self] duration:0.01]];
      }
  
  }
  </code></pre>
  
  <p>Currently this is my code and it is working perfectly for draging.</p>