Explorar o código

Merge pull request #356 from blackberry-gaming/next-dgough

Next dgough
Sean Paul Taylor %!s(int64=13) %!d(string=hai) anos
pai
achega
3e5984ee0e
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  1. 2 2
      gameplay/src/PlatformAndroid.cpp

+ 2 - 2
gameplay/src/PlatformAndroid.cpp

@@ -835,9 +835,9 @@ void Platform::getAccelerometerValues(float* pitch, float* roll)
     tz = -__sensorEvent.acceleration.z;
     tz = -__sensorEvent.acceleration.z;
     
     
     if (pitch != NULL)
     if (pitch != NULL)
-        *pitch = atan(ty / sqrt(tx * tx + tz * tz)) * 180.0f * M_1_PI;
+        *pitch = -atan(ty / sqrt(tx * tx + tz * tz)) * 180.0f * M_1_PI;
     if (roll != NULL)
     if (roll != NULL)
-        *roll = atan(tx / sqrt(ty * ty + tz * tz)) * 180.0f * M_1_PI;
+        *roll = -atan(tx / sqrt(ty * ty + tz * tz)) * 180.0f * M_1_PI;
 }
 }
 
 
 void Platform::swapBuffers()
 void Platform::swapBuffers()