unity rotate towards velocity code example
Example 1: set rotation to velocity unity
transform.rotation = Quaternion.LookRotation(rigidbody.velocity);
Example 2: unity rotate towards
Quaternion.RotateTowards(Quaternion from, Quaternion to, float maxDegreesDelta);