开发者

Question about the capabilities of the iPhone accelerometer and gyroscope and which is ideal to use for this implementation

I have a game that I am working on where I am wanting to capture the movement of the device as it stays completely flat (no tilting) but is moved forward, or backward, or side to side...Ideally, this detection would be very accurate.

I am just starting to dig into the code for how to implement the accelerometer or gyroscope, but before I get too far, I am wondering which of those technologies would be ideal to capture this type of motion?

Is that type of motion even possible to capture? It is a unique circumstanc开发者_开发问答e that I am implementing it, but if I could pull it off it'd be awesome.

Please let me know


Gyroscopes are usually used to measure rotation or orientation. In your case, I'd expect you'll be better off with the accelerometer. Now most apps I saw used the accelerometer to measure tilt but I'd be interested to see to what extent you can push your idea.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜