Fixing magnetometer on iOS
This commit is contained in:
parent
a14ad02d15
commit
4b7d1d8c15
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