Try to fix broken gyroscope control in iOS

This commit is contained in:
Benau 2020-03-15 15:06:32 +08:00
parent 1b3cc83235
commit 1e5e91dabf

View File

@ -559,6 +559,8 @@ namespace irr
ev.AccelerometerEvent.Z = motionManager.accelerometerData.acceleration.z * 9.81;
if (m_upside_down)
ev.AccelerometerEvent.Y = -ev.AccelerometerEvent.Y;
if (ev.AccelerometerEvent.X < 0.0)
ev.AccelerometerEvent.X *= -1.0;
postEventFromUser(ev);
}