Fixing magnetometer on iOS

This commit is contained in:
BastiaanOlij 2017-03-21 23:50:53 +11:00
parent a14ad02d15
commit 4b7d1d8c15
1 changed files with 1 additions and 1 deletions

View File

@ -299,7 +299,7 @@ static int frame_count = 0;
motionManager = [[CMMotionManager alloc] init];
if (motionManager.deviceMotionAvailable) {
motionManager.deviceMotionUpdateInterval = 1.0/70.0;
[motionManager startDeviceMotionUpdates];
[motionManager startDeviceMotionUpdatesUsingReferenceFrame:CMAttitudeReferenceFrameXMagneticNorthZVertical];
motionInitialised = YES;
};
};