Merge pull request #8100 from BastiaanOlij/ios_magnetometer_2.1
Fixing magnetometer on iOS
This commit is contained in:
commit
fd17d301d0
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
};
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue