title: How Can I store the 2D Rotation in Unity?
body: <p>I need to rotate the wheel from the previous position. But it resets every time Screen is touched. The problem occurs when the touch is ended(Released) and then again Touched.</p>
  
  <p>I need to store the Rotation value of the object.</p>
  
  <p>Any Help is appreciated. Thanks</p>
  
  <hr>
  
  <p><a href="https://drive.google.com/open?id=1M-2DlZunlBXjugkThxWYF-tqviuB-G53" rel="nofollow noreferrer">Video</a></p>
  
  <hr>
  
  <pre><code>direction = Camera.main.ScreenToWorldPoint(touch.position) - transform.position;
    angle = (Mathf.Atan2(direction.y, direction.x) * Mathf.Rad2Deg)-90;
    rotation = Quaternion.AngleAxis(angle, Vector3.forward);
    transform.rotation = Quaternion.Slerp(transform.rotation, rotation, speed * Time.deltaTime);
    oldRotation = transform.rotation;
  </code></pre>