A 3x3 matrix isn't included in Unity, only 4x4 matrices and quaternions. For quaternions, the euler angles can be easily extracted by accessing their property `.eulerAngles`. (e.g. `var rotMatrix = Quaternion.Euler(30, 20, 40); Debug.Log(rotMatrix.eulerAngles);`). So, if you can express your rotation in terms of a quaternion, you can use that. Otherwise you can look at the maths here (http://www.staff.city.ac.uk/~sbbh653/publications/euler.pdf), but remember that Unity does rotation in ZXY order, not ZYX as in the paper.
– Maximilian GerhardtApr 05 '16 at 19:53
1
Ok, thanks! But it's possibile to extract euler angles from 4x4 matrix? If not, i have to convert my transformation matrix 4x4 in quaterion matrix and than extract euler angles, right?
– user2543127Apr 05 '16 at 19:56
1
You could try the code from http://answers.unity3d.com/questions/11363/converting-matrix4x4-to-quaternion-vector3.html to get a `Quaternion` from a `Matrix4x4`. If that helped you, you can also write your own answer.
– Maximilian GerhardtApr 05 '16 at 21:54