title: Rotation third person in direction to camera?
body: <p>I want my object to rotate towards the camera at the same time when I rotate the camera, so that the player while walking is always oriented in the direction of the camera, as in typical third-person games.
  Unfortunately, any method used so far leads me to a rotation of the object, slightly behind, the rotation of the camera.
  I've been looking for a solution for a week and I'm desperate.
  I publish a video of the rotation I have with an object.</p>
  
  <p><a href="https://screencast-o-matic.com/watch/cYhI2kgREN" rel="nofollow noreferrer">video of the late rotation</a></p>
  
  <pre><code>private Rigidbody rb;
  public float speed = 1.0f;
  
  void Start()
      {
        rb = GetComponent&lt;Rigidbody&gt;(); 
      }
  
  direction = Camera.main.transform.forward;
  direction.y = 0.00f;
  
  private void FixedUpdate ()
  {
  
   Quaternion targetRotation = Quaternion.LookRotation(direction);
  Quaternion newRotation = Quaternion.Lerp(rb.transform.rotation, targetRotation, speed * Time.fixedDeltaTime);
  rb.MoveRotation(newRotation);
   }  
  
  }
  </code></pre>