Forum Discussion
bang
12 years agoHonored Guest
I'm confusing how to send Oculus rift rotation data
Hello! Oculus Rift developer!
I'm newbie in oculus rift development.
and please understand my bad english.
I have tried to send oculus rift rotation data to opengl model.
If I rotate the oculus rift, cube model in opengl rotate likewise.
so, I used this function
I got yaw, pitch, roll data.
and I send them to cube model after they were changed from radian to degree.
and I used this function in opengl
but It is not working correctly.
Once I tried to confirm yaw, pitch, roll data, they varied continously.
I think that the cause of the problem is that.
I really want your help or advice!!
If anybody knows about it, please teach me all of thing!
Thank you very much!
and I wish you understand my bad english!
:lol: :lol:
I'm newbie in oculus rift development.
and please understand my bad english.
I have tried to send oculus rift rotation data to opengl model.
If I rotate the oculus rift, cube model in opengl rotate likewise.
so, I used this function
pose.Rotation.GetEulerAngles<Axis_Y, Axis_X, Axis_Z>(&hmdYaw, &hmdPitch, &hmdRoll);
I got yaw, pitch, roll data.
and I send them to cube model after they were changed from radian to degree.
and I used this function in opengl
glRotatef(rotationY, 0.0, 1.0, 0.0);
glRotatef(rotationX, 1.0, 0.0, 0.0);
glRotatef(rotationZ, 0.0, 0.0, 1.0);
but It is not working correctly.
Once I tried to confirm yaw, pitch, roll data, they varied continously.
I think that the cause of the problem is that.
I really want your help or advice!!
If anybody knows about it, please teach me all of thing!
Thank you very much!
and I wish you understand my bad english!
:lol: :lol:
3 Replies
- obzenExpert Protegedo you call glLoadIdentity() at the start of the render?
glMatrixMode(GL_MODELVIEW);
glLoadIdentity(); - bangHonored GuestYes, Of course~!!!
I confirmed that the cube rotated.
but Yaw, Pitch, Roll values varies widely.
e.x
When the Oculus rift isn't moving, Yaw, Pitch, Roll data isn't changed. <- this is my thought.
Is it correct? - Euler angles are non commutative. That means the order you combine them in will affect the result.
If the orientation seems wrong, try changing the order of the glRotatef calls.
Quick Links
- Horizon Developer Support
- Quest User Forums
- Troubleshooting Forum for problems with a game or app
- Quest Support for problems with your device
Other Meta Support
Related Content
- 2 months ago
- 6 months ago