- Home /
How to get find euler angle provided I have Transformation Matrix
Hello I have a 2 camera setup, Cam1 and Cam2. Provided I get the Transformation matrix to convert Cam2 view same as Cam1. How Can I get the rotation matrix and Euler angles?
Answer by Captain_Pineapple · Jan 23, 2019 at 11:45 AM
Hey there,
I'm not sure if i understand your question correctly but heres a shot at your problem:
To get a relative rotation as a quaternion between 2 rotations you can follow the answer provided here in this question.
Of cause you can also convert the resulting quaternion to euler angles by simply accessing myQuaternion.eulerAngles
. (This assumes you have a rotation called myQuaternion)
if you simply want to set one rotation the same as the other you can simply say: Cam1.transform.rotation = Cam2.transform.rotation;
Of cause the opther way round will also work. Hope this helps. For future questions i'd recommand that you write a bit more about your problem, your current code and what you have tried already. The more detailed you provide information on your issue the higher the probability that someone can actually help you.