player isnt moving based on rotation unity velocity rigidbody code example
Example 1: set rotation to velocity unity
transform.rotation = Quaternion.LookRotation(rigidbody.velocity);
Example 2: unity how to set rigidbody velocity
Vector3 velocity = new Vector3(10f/*x*/, 10f/*y*/, 10f/*z*/);
GetComponent<Rigidbody>().velocity = velocity;