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];
|
motionManager = [[CMMotionManager alloc] init];
|
||||||
if (motionManager.deviceMotionAvailable) {
|
if (motionManager.deviceMotionAvailable) {
|
||||||
motionManager.deviceMotionUpdateInterval = 1.0/70.0;
|
motionManager.deviceMotionUpdateInterval = 1.0/70.0;
|
||||||
[motionManager startDeviceMotionUpdates];
|
[motionManager startDeviceMotionUpdatesUsingReferenceFrame:CMAttitudeReferenceFrameXMagneticNorthZVertical];
|
||||||
motionInitialised = YES;
|
motionInitialised = YES;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue