title: Unity 3D RotateTowards not working need a threshold I think
body: <p>I have the following code that rotates an object towards a target point at a smooth rate.</p>
  
  <pre><code>public bool RotatedTowards(Vector3 lookAtPoint, float deltaTime)
  {
      flatDirPath = Vector3.Scale((lookAtPoint - transform.position), new Vector3(1, 0, 1));
      targetRotation = Quaternion.LookRotation(flatDirPath, Vector3.up);
      transform.rotation = Quaternion.RotateTowards(transform.rotation, targetRotation, deltaTime * basicProperties.turnRate);
      if (Vector3.Dot(flatDirPath.normalized, transform.forward) &gt;= 0.9f)
      {
          return true;
      }
      else
      {
          return false;
      }        
  }
  </code></pre>
  
  <p>It works well enough, the problem is if I right click around a point to move to really fast (telling this object to rotate toward a very similar but different lookAtPoint at a very high frequency), the object shakes very slightly as its constantly making small rotational changes (I believe that's whats happening).</p>
  
  <p>I believe the best solution may be to only do the transform.rotation if the target point is over a threshold from the front of the object, say at least 1 degree to the left or the right of the direction the object is already facing. How could I test this? If it's under 1 degree, no point rotating toward it, and that should remove the shaking from clicking around the same point really fast. I hope.</p>
  
  <p>Any help is appreciated. Thanks</p>