Hi, I just started out with unity, for a 2d game prototype, and I ran into the following:
I want to immediately rotate a gameObject through a script.
when I do this:
Quaternion rot = playerTransform.rotation;
rot.z = Mathf.PI;
playerTransform.localRotation = rot;
I expect the rotation z in the inspector to jump to 180, but instead it’s 157 or something, and after some more calls to this function it lerps towards 180. I did not add any physics or anything.
How can I set it to update immediately?