4

I want to reset CMMotionManager's attitude so the rotationMatrix points to the "front" (that is, the device rotation around the gravity axis it's at its default position). This is the behavior when you call -startDeviceMotionUpdates on a disabled CMMotionManager.

Once the motion manager it's running, if you call -stopDeviceMotionUpdates, wait for a while, and then you call -startDeviceMotionUpdates again, I get the behavior I'm looking for.

However, the attitude is not reset if you call -stopDeviceMotionUpdates and immediately call -startDeviceMotionUpdates again; it keeps the previous attitude. Instantiating a new CMMotionManager produces the same results (I guess the motion manager system is a singleton under the hoods).

Is there a way I make sure that iOS's motion manager internal attitude is reset without introducing artificial or arbitrary delays

Ricardo Sanchez-Saez
  • 9,466
  • 8
  • 53
  • 92

0 Answers0