shawn75's picture

Calling oculus orientation the right way ?

I wondeer if i am calling the oculus orientation right ? I get some strange values that are consistant but hard to wrap around.

When i turn for 90 degres i get 0.6682125 and around 1.22 for 180 degres and i was expecting radians or degres.

What is the exact 180 degre value or am i calling th wrong function ?

My code in main program

 Quaternion where = Rift.Orientation;
 
            float Xa = where.X;  
            float Ya = where.Y;
            float Za = where.Z;
            float Wa = where.W;

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Frassle's picture

Quaternions do not store angles! A quaternion is a 4 dimensional number, when used for orientations you normalize them so they represent a point of a 4 dimensional sphere. If this is the first time you've worked with quaternions I'd suggest doing some reading into the math first. They are commonly used and there are many sites that describe them and their use in games without requiring the reader to be a math expert.

shawn75's picture

Thank you for your help. This is the first time i work in 3D and its my graduation work. I am a bit low on time. Since i need to finish it till the first of August. Sorry if i ask stupid questions sometimes.

Frassle's picture

Stupid questions are fine as long as your happy to accept that sometimes the answer is that you need to read more :) If you have any more specific questions about quaternions you can ask here again.