Good afternoon. I have the following problem with conversion of quaternions. For the explanation I will write the direct code:
float zAn = 40;
float yAn = -56;
Quaternion myq = Quaternion.Euler(0, 0, zAn);
Cube.rotation = myq;
Cube.Rotate(Vector3.right, yAn, Space.self);
Quaternion myqD = Cube.rotation;
Cube.Rotate(Vector3.forward, -zAn, Space.world);
Debug.Log("MyAng " + Cube.eulerAngles.x + " " + Cube.eulerAngles.y + " " + Cube.eulerAngles.z);
From debug I see (-56, 0, 0). That that also is necessary to me. But a problem that at me myqD is known only. How to calculate zAn if myqD is known only? Thanks in advance for the help.