title: Unity object smooth rotation
body: <p>I want to achieve this type of rotation of the object but with smooth movement. How can i do that?</p>
  <pre><code>void Update()
  {
      if (Input.GetKey(KeyCode.Mouse1))
      {
          transform.rotation = Quaternion.Euler(mainCamera.eulerAngles.x, mainCamera.eulerAngles.y, 0f);
      }
  }
  </code></pre>