Forum Discussion
2EyeGuy
11 years agoAdventurer
Posef is missing in v0.32
Perhaps the first thing anyone wants to do with the SDK is see if they can get the Euler angles from the tracker.
Unfortunately the documentation is even more wrong than it was in v0.31, because Posef that the documentation tells you to use doesn't exist.
Here is how I read the sensor instead (in Doom 3's angle system):
I hope that helps someone.
Unfortunately the documentation is even more wrong than it was in v0.31, because Posef that the documentation tells you to use doesn't exist.
Here is how I read the sensor instead (in Doom 3's angle system):
#include <windows.h>
#include "OVR_CAPI.h"
#include "Kernel/OVR_Math.h"
void ReadHmdOrientation(float *roll, float *pitch, float *yaw)
{
if (hmd)
{
ovrSensorState ss = ovrHmd_GetSensorState(hmd, 0.0);
if (ss.StatusFlags & (ovrStatus_OrientationTracked))
{
OVR::Transformf pose = ss.Recorded.Pose; // can't use prediction without frame timing
float y = 0.0f, p = 0.0f, r = 0.0f;
pose.Rotation.GetEulerAngles<OVR::Axis_Y, OVR::Axis_X, OVR::Axis_Z>(&y, &p, &r);
*roll = -RADIANS_TO_DEGREES(r); // ???
*pitch = -RADIANS_TO_DEGREES(p); // should be degrees down
*yaw = RADIANS_TO_DEGREES(y); // should be degrees left
}
}
}
I hope that helps someone.
1 Reply
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
- 1 month ago
- 4 years ago