title: NavMeshAgent first rotate to target direction and than move to it?
body: <p>I'm making a small space game in 3D, but it looks awful when my ship is rotating in the middle of movement
  So can someone please help me with code ? I need to rotate to that position and than move to it. (And i forgot to say, that rotation needs to be on Y axis)</p>
  <p>Here is my code for that movement.</p>
  <pre><code>NavMeshAgent agent;
  
  void Start()
  {
      agent = GetComponent&lt;NavMeshAgent&gt;();
  }
  void Update()
  {
      
      if(Input.GetMouseButton(0))
      {
          RaycastHit hit;
          Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition);
          if (Physics.Raycast(ray, out hit) &amp;&amp; hit.collider.tag == &quot;Ground&quot;)
          {
              agent.SetDestination(hit.point);
          }
          
      }
      
  }
  </code></pre>