I’ve just started playing with CMMotionManager on my iPhone in an OpenGL program. I allocate CMMotionaManger and startDeviceMotionUpdates in -viewDidLoad. In -update I check if deviceMotionActive and print the roll value.
motionManager.deviceMotion.attitude.roll For the first few times it is 0.0, but after a while a new value kicks in that seems right (e.g., 90-ish degrees or 50* or something that reflects how I am holding my phone. (1) Does CMMotionManager need a little bit of time before deviceMotion.attitude values are valid? (2) Is there a proper way to determine when deviceMotion.attitude has valid values? Thanks, Todd
signature.asc
Description: Message signed with OpenPGP using GPGMail
_______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com