unity rotate against velocity direction code example Example: set rotation to velocity unity transform.rotation = Quaternion.LookRotation(rigidbody.velocity);