character controller 45 degrees rotation

hi,

I need to rotate my player(character controller) by 45 degrees using the keyboard arrow keys in the same way as

R2D2 QUEST game

there is more than one type of rotation in unity docs
and I do not know which combination should be used with character controller

please I really need help to correctly set up this script:

target angle value = 0;

function Update () {
    
   if (Input.GetKeyDown ("up")) {
        target angle value = 0;
    }
    if (Input.GetKeyDown ("up"))  (Input.GetKeyDown ("right"))  {
        target angle value = 45;
    }
    if (Input.GetKeyDown ("right")) {
        target angle value = 90;
    }
    if (Input.GetKeyDown ("down"))  (Input.GetKeyDown ("right"))  {
        target angle value = 135;
    }
    if (Input.GetKeyDown ("down")) {
        target angle value = 180;
    }
    if (Input.GetKeyDown ("down"))  (Input.GetKeyDown ("left"))  {
        target angle value = 225;
    }
     if (Input.GetKeyDown ("left")) {
        target angle value = 270;
    }

current angle value = character controller y angle
which command do i use? transform.rotation.y or Transform.eulerAngles .y or...

angle = smooth transition values
which lerp function do i use in this case?

transform.Rotate(0,angle,0)

}

If you want to get smooth turning transitions, use Quaternion.Euler to create two rotation values, one each for the start angle and the end angle of the turn. Then, use Quaternion.Slerp to get the intermediate rotations between the two.