mirror of
https://github.com/godotengine/godot.git
synced 2025-04-01 00:41:35 +08:00
Fixing magnetometer on iOS
(cherry picked from commit 4b7d1d8c15747a552b7dff52b0eeda4d3e7cec4e)
This commit is contained in:
parent
af282b56fe
commit
a0b0dff6fd
@ -299,8 +299,8 @@ static int frame_count = 0;
|
||||
if (!motionInitialised) {
|
||||
motionManager = [[CMMotionManager alloc] init];
|
||||
if (motionManager.deviceMotionAvailable) {
|
||||
motionManager.deviceMotionUpdateInterval = 1.0/70.0;
|
||||
[motionManager startDeviceMotionUpdates];
|
||||
motionManager.deviceMotionUpdateInterval = 1.0/70.0;
|
||||
[motionManager startDeviceMotionUpdatesUsingReferenceFrame:CMAttitudeReferenceFrameXMagneticNorthZVertical];
|
||||
motionInitialised = YES;
|
||||
};
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user