Welcome to the Oculus Developer Forums!

Your participation on the forum is subject to the Oculus Code of Conduct.

In general, please be respectful and kind. If you violate the Oculus Code of Conduct, your access to the developer forums may be revoked at the discretion of Oculus staff.

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

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)?

Answers

  • 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.

  • wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww
Sign In or Register to comment.