Rigidbody.velocity - "Horizontal" rotates my player on the "y" and moves him on the "z","y".

Right here i have this very simple movment code but every time i move along the Horizontal axis it rotates me on the “y” and moves me on the “z”, “y”. Could someone help me fix this and explain why is this happening?

7622209–948028–Controller.cs (508 Bytes)

Try changing your code to use the AddForce() method instead of changing the velocity at every update step. According to the documentation: