Rotating Character

I am using unitys movement script

void Update() {
        CharacterController controller = GetComponent<CharacterController>();
        if (controller.isGrounded) {
            moveDirection = new Vector3(Input.GetAxis("Horizontal"), 0, Input.GetAxis("Vertical"));
            moveDirection = transform.TransformDirection(moveDirection);
            moveDirection *= runningSpeed;
            if (Input.GetButton("Jump"))
                moveDirection.y = jumpSpeed;
        moveDirection.y -= Gravity * Time.deltaTime;
        controller.Move(moveDirection * Time.deltaTime);


In the input tags i changed horizontal to me controlled with Q and E because i want A and D to rotate the character. What would i do to do this. Would it me another moveDirection or what?

Add this line at the beggining of the Update function:

void Update(){

  CharacterController controller = ...

You must also define the “Rotate” axis in the input manager and assign the keys “a” and “d” to the Positive and Negative buttons. The value 60 above indicates it will turn 60 degrees per second in each direction - change it if the turning speed is too high or too low.