Rotate rigidbody in the direction of travel but not instant rotatation

Hello

I have a script where by i move my rigidbody like this:

Vector3 direction = (target - transform.position).normalized;

rb.MovePosition(transform.position + direction * Time.deltaTime * walkSpeed);

But i want to rotate the character so he is facing the direction of travel as he walks. What is the best way to do this when having a known direction as I am unsure on what to use.

1 fancy way that comes to mind is first finding out how you would instantly rotate it to that direction. That rotation naturally means a quaternion. So when you have that known (maybe using LookAt()?), you can Quaternion.Lerp() to make rotation slowly blend towards the new one.

Are you moving the character towards a mouse?

You might want to use: