title: How to move a UIImageView towards a certain point based on its degrees rotation?
body: <p>I have a <strong>rocket</strong> UIImageView that constantly rotates around itself with an NSTimer:</p>
  <pre><code> rotationDegrees = rotationDegrees + 0.5
   rocket.transform = CGAffineTransformMakeRotation(rotationDegrees * CGFloat(M_PI/180) )
  </code></pre>
  <p>Once I tap on the screen, I need it to simply fire it into a specific trajectory (I'm using UIKit, no SpriteKit, so please no SpriteKit suggestions :)
  Here's a picture as an example of trajectory:</p>
  <p><a href="https://i.stack.imgur.com/WhXe4.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/WhXe4.png" alt="enter image description here" /></a></p>
  <p>My touchesBegan() method:</p>
  <pre><code>override func touchesBegan(touches: Set&lt;UITouch&gt;, withEvent event: UIEvent?) {
      // Invalidate the timer that rotates the Rocket
          rotationTimer.invalidate()
      
          // Fire timer that moves the Rocket
          moveRocketTimer = NSTimer.scheduledTimerWithTimeInterval(0.01, target: self, selector: &quot;moveRocket&quot;, userInfo: nil, repeats: true)
  }
  </code></pre>
  <p>Here's the function where I need to move the Rocket like 8 points X and 8 points Y</p>
  <pre><code>func moveRocket() {
    rocket.center.x = ??? + 8
    rocket.center.y = ??? + 8
  }
  </code></pre>
  <p>I'm using a NSTimer to move the rocket because I need to check its collision with another view by using <strong>if CGRectIntersectsRect()</strong>.</p>