Frage

Can i know through Gyroscope, if I've moved some distance?

To elaborate my question, can I be able to detect the device's motion if the user moves a couple of feet from the starting position?

Thanks in advance.

War es hilfreich?

Lösung

Linear motion is detected using the accelerometer. Rotation is detected using the gyroscope.

You can use the CMDeviceMotion class to detect both types of movement. You will have to integrate the value of userAcceleration over time to detect a change in position.

Check out the What's New in Core Motion video from WWDC 2011. You will probably find it helpful.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top