cancel
Showing results for 
Search instead for 
Did you mean: 

Why does the best practice guide suggest avoiding euler angles and instead using quaternions for cam

MaxVRIR-ahub
Honored Guest

What is the real difference between these two? Im not well versed in mathematics so trying to disambiguate the two hasn't really gotten me any where. Is this because the rotation of our eyes does not happen from a central point within, but rather around an external axis (our head)?

2 REPLIES 2

volgaksoy-ahub
Honored Guest

Euler angles are usually problematic because of a few reasons. They mainly exhibit problems such as gimbal-lock where one Euler angle axis rotates to overlap with another axis leading to singularities, and another issue being the fact that Euler angles require the system to know an order-of-axes to apply the rotation, such as Z, Y, X or X, Z, Y etc. Otherwise two sets of Euler angles with the same values but different order-of-axes can lead to different final orientations.

Quaternions don't exhibit either of these issues, and are conveniently the format the Oculus SDK provides the orientations in which happen to be part of the ovrPosef structure (as ovrQuatf Orientation) returned from calls like the ovrHmd_GetEyePoses function.

netfuzzer-ahub
Honored Guest
wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww