private void Update()
{
Quaternion newRotation = Quaternion.AngleAxis(180, Vector3.up);
transform.rotation = Quaternion.Slerp(transform.rotation, newRotation, .05f);
}
The problem it's not always rotating by 180. I control the character movement and rotation and at some point i want the character to rotate to the opposite direction no matter what direction he is facing now.
If Y on the rotation is 120 or 45 or 4 or 23 always rotate to the opposite direction.