I am trying to rotate a transform with a quaternion. I want to rotate on x, y, and z in a single operation but it doesn’t work if I use 180 degrees on all axises. If I use 180 degrees with any two axises and a different value for the third axis it seems to work properly. In the case where I use 180 degrees for all three axises the transform doesn’t rotate on any axis, but remains in its original orientation.
My question is whether this is expected behavior for a quaternion or is it a bug. Code fragment follows:
Transform t = gameObject.transform;
t.rotation = Quaternion.Euler(180,180, 180) * t.rotation;