ソースを参照

Fixing magnetometer on iOS

BastiaanOlij 8 年 前
コミット
4b7d1d8c15
1 ファイル変更1 行追加1 行削除
  1. 1 1
      platform/iphone/app_delegate.mm

+ 1 - 1
platform/iphone/app_delegate.mm

@@ -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;
  		};
  	};