180 degree quick turn rotation?

I am trying to implement a smooth 180 degree quick turn rotation where if you press LB on the 360 pad the character rotates +180 degrees on the Y axis no matter what direction the player is in then stops until the button is pressed again. However, everything I’ve tried and written usually just forces the player’s rotation to 180 or instantly transitions to +180 degrees at an instant un-smooth speed, or it simply doesn’t rotate the desired 180 degrees. I’ve used eulerAngles, Quaternions, etc.

Basically like this; no matter where the player is if I press LB the player should quickly rotate +180 degrees. Then if I press LB again, she rotates +180 again, etc. So say if my character’s Y rotation is at 75 and I hit LB it would +180 and be at 255, etc.

While this code does exactly what I want it to do, it is WAY too instant:

        if (Input.GetKeyDown(KeyCode.Joystick1Button4))
        {
            transform.rotation *= Quaternion.Euler(0, 180, 0);
        }

you’re executing the entire rotation change in one frame, so yeah, instant.

google “unity lerp rotation” (loads of stuff on that out there) and look into coroutines.

https://unity3d.com/learn/tutorials/modules/intermediate/scripting/coroutines
How to Lerp like a pro | Chico Unity3D (lerping positions, but the principles are well covered and should be easy to apply to lerping anything)