I can’t imagine that something fundamental like this is bugged, so it must be my fault, but I don’t know what it is.
Matrix4x4 test = Matrix4x4.TRS(Vector3.zero, Quaternion.identity, Vector3.one);
Debug.Log("trans: " + test.GetPosition());
Debug.Log("rot: " + test.GetRotation().eulerAngles);
Debug.Log("scale: " + test.GetScale());
results (correctly) in:
trans: (0.0, 0.0, 0.0)
rot: (0.0, 0.0, 0.0)
scale: (1.0, 1.0, 1.0)
but
Matrix4x4 test = Matrix4x4.TRS(Vector3.zero, Quaternion.identity, new Vector3(.5f,.5f,.5f));
Debug.Log("trans: " + test.GetPosition());
Debug.Log("rot: " + test.GetRotation().eulerAngles);
Debug.Log("scale: " + test.GetScale());
results in:
trans: (0.0, 0.0, 0.0)
rot: (18.0, 58.3, 58.3) <----- (!!!)
scale: (0.5, 0.5, 0.5)
Am I being dumb here or is this busted?
I’m in Unity 5.5.1f1.
Thanks