mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 07:17:43 +02:00
Added prediction for Oculus rift to reduce apparent latency.
This commit is contained in:
parent
e6d12bf239
commit
81ed0d99f7
1 changed files with 3 additions and 2 deletions
|
@ -50,6 +50,7 @@ void OculusManager::connect() {
|
||||||
_sensorDevice = *_hmdDevice->GetSensor();
|
_sensorDevice = *_hmdDevice->GetSensor();
|
||||||
_sensorFusion = new SensorFusion;
|
_sensorFusion = new SensorFusion;
|
||||||
_sensorFusion->AttachToSensor(_sensorDevice);
|
_sensorFusion->AttachToSensor(_sensorDevice);
|
||||||
|
_sensorFusion->SetPredictionEnabled(true);
|
||||||
|
|
||||||
HMDInfo info;
|
HMDInfo info;
|
||||||
_hmdDevice->GetDeviceInfo(&info);
|
_hmdDevice->GetDeviceInfo(&info);
|
||||||
|
@ -201,7 +202,7 @@ void OculusManager::reset() {
|
||||||
|
|
||||||
void OculusManager::getEulerAngles(float& yaw, float& pitch, float& roll) {
|
void OculusManager::getEulerAngles(float& yaw, float& pitch, float& roll) {
|
||||||
#ifdef HAVE_LIBOVR
|
#ifdef HAVE_LIBOVR
|
||||||
_sensorFusion->GetOrientation().GetEulerAngles<Axis_Y, Axis_X, Axis_Z, Rotate_CCW, Handed_R>(&yaw, &pitch, &roll);
|
_sensorFusion->GetPredictedOrientation().GetEulerAngles<Axis_Y, Axis_X, Axis_Z, Rotate_CCW, Handed_R>(&yaw, &pitch, &roll);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue