How to make side scrolling character do a full turn when changing direction?

Thanks to Est_engine’s comments, I’ve found a solution to do a full 180 turn (and keep the character facing the camera when turning) which I’ve posted here. Thanks for your great input, Est_engine!