Smoothing eulerAngles rotation?

So i have a character selection rig set up and i am using

transform.rotation.eulerAngles = Vector3(0, 0, 0);

to change the rotation so you can select different players.

My question to the community is how do i smooth out the rotation over timer instead of instant rotation to object position.

Here is what is in the Update.

if(RotateNum == 0){
transform.rotation.eulerAngles = Vector3(0, 0, 0);
}else if(RotateNum == 1){
transform.rotation.eulerAngles = Vector3(0, 90, 0);
}else if(RotateNum == 2){
transform.rotation.eulerAngles = Vector3(0, 180, 0);
}else if(RotateNum == 3){
transform.rotation.eulerAngles = Vector3(0, 270, 0);
}

Hello,

To create smoothing effects you need to move over a period of time. One way of doing this is using Lerp, which is a static Vector3 method.

However, using eulerAngles for interpolation is not the best idea, due to many of the downsides of Euler Angles, I would suggest using the already built in Quaternions. Using these avoids gimbal locking as well as solves the shortest rotation problem. Therefore I sould suggest using Quaternion.Lerp and Quaternion rotations instead of EulerAngles

Hope this helps,
Benproductions1