Hi guys!
I hope you might give me a clue what’s going on here…
I got some really weird x-value rounding happening here, when converting from euler to quaternion and back…
Code:
Vector3 testVec1 = new Vector3(88, 0, 0);
Debug.Log("testVec1: Setting rotation to: " + testVec1);
Debug.Log("testVec1: Set rotation to: " + Quaternion.Euler(testVec1).eulerAngles);
Vector3 testVec2 = new Vector3(0, 88, 0);
Debug.Log("testVec2: Setting rotation to: " + testVec2);
Debug.Log("testVec2: Set rotation to: " + Quaternion.Euler(testVec2).eulerAngles);
Output:
testVec1: Setting rotation to: (88.0, 0.0, 0.0)
testVec1: Set rotation to: (90.0, 0.0, 0.0) // <== !!! why 90 ?!?!?
testVec2: Setting rotation to: (0.0, 88.0, 0.0)
testVec2: Set rotation to: (0.0, 88.0, 0.0)
Anyone got an idea where this comes from??