Rotating player to direction of movement issue

So I’m trying to make my player rotate toward the direction of movement and it kind of works, except along with rotating along the y axis toward the direction, the player immediately rotates on the x axis laying flat versus being upright.

This is the only code I’m using for rotation:

void Rotation()
    {
        Vector3 NextDir = new Vector3(Input.GetAxisRaw("Horizontal"), 0, Input.GetAxisRaw("Vertical"));

        if (NextDir != Vector3.zero)
        {
            transform.rotation = Quaternion.LookRotation(NextDir);
        }
    }

Quaternion.LookRotation will align the forward vector of your player with the direction. What seems to be happening is that you’ve set it up in the editor so that your players forward direction is actually pointing up. When you select it with the move tool active, look at the blue arrow, this is the forward direction, and should be facing in the players forward direction in the editor.

If you need to rotate the player model to have it face in the correct direction, create a child gameobject and rotate it there.