how to get forawrd velocity of rotating object code example
Example: set rotation to velocity unity
transform.rotation = Quaternion.LookRotation(rigidbody.velocity);
transform.rotation = Quaternion.LookRotation(rigidbody.velocity);