mirror of
https://github.com/overte-org/overte.git
synced 2025-04-21 20:44:14 +02:00
Merge pull request #398 from birarda/master
correct sign of yaw for oculus
This commit is contained in:
commit
3e16e6a36c
3 changed files with 6 additions and 6 deletions
|
@ -1377,7 +1377,7 @@ void Application::updateAvatar(float deltaTime) {
|
|||
float yaw, pitch, roll;
|
||||
OculusManager::getEulerAngles(yaw, pitch, roll);
|
||||
|
||||
_myAvatar.getHead().setYaw(-yaw);
|
||||
_myAvatar.getHead().setYaw(yaw);
|
||||
_myAvatar.getHead().setPitch(pitch);
|
||||
_myAvatar.getHead().setRoll(roll);
|
||||
}
|
||||
|
|
|
@ -131,12 +131,12 @@ void Head::calculateGeometry(bool lookingInMirror) {
|
|||
//generate orientation directions based on Euler angles...
|
||||
|
||||
float pitch = _pitch;
|
||||
float yaw = -_yaw;
|
||||
float roll = -_roll;
|
||||
float yaw = _yaw;
|
||||
float roll = _roll;
|
||||
|
||||
if (lookingInMirror) {
|
||||
yaw = _yaw;
|
||||
roll = _roll;
|
||||
yaw = -_yaw;
|
||||
roll = -_roll;
|
||||
}
|
||||
|
||||
_orientation.setToIdentity();
|
||||
|
|
|
@ -38,7 +38,7 @@ void OculusManager::connect() {
|
|||
|
||||
void OculusManager::getEulerAngles(float& yaw, float& pitch, float& roll) {
|
||||
#ifdef __APPLE__
|
||||
_sensorFusion.GetOrientation().GetEulerAngles<Axis_Y, Axis_X, Axis_Z, Rotate_CW, Handed_R>(&yaw, &pitch, &roll);
|
||||
_sensorFusion.GetOrientation().GetEulerAngles<Axis_Y, Axis_X, Axis_Z, Rotate_CCW, Handed_R>(&yaw, &pitch, &roll);
|
||||
|
||||
// convert each angle to degrees
|
||||
yaw = glm::degrees(yaw);
|
||||
|
|
Loading…
Reference in a new issue