Вопрос

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.

Это было полезно?

Решение

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.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top