x


gyroscope or accelrometer??

First, sorry for bad english

im trying to make something silmilar to doodle jump, a character controlled by the inclination of the device (ios) but im little confused about why i need to use

why is better to try, gyroscope or accelerometer?

i just buy a ipod touch 4g but before i have a ipod 2g and so many applications work in similar way, and dont have a gyroscope

any can help? and if you have some tutorial or example code, will be great :)

thanks for your help.

more ▼

asked Apr 12 '12 at 01:40 AM

rubenpvargas gravatar image

rubenpvargas
54 6 8 9

(comments are locked)
10|3000 characters needed characters left

1 answer: sort voted first

I haven't played Doodle jump, but if you want to control a character based on the current tilt of the phone, then either the gyroscope or the accelerometer will do the trick, though the gyro is probably better.

The gyro tells you the rotatation around the axis of the phone relative to a starting point which iirc is phone upright with screen facing south.

The accelerometer will tell you the direction of force being applied to the phone, which most of comes from gravity. You can then calibrate a starting direction and measure the change off that compared to static axis.

more ▼

answered Apr 12 '12 at 01:45 AM

Talimar gravatar image

Talimar
146 4 4 7

after feu trys, i choose accelerometer, is more easy to undertand and unity remote suport the correct test. If somebody are making a game like this, take a look a iphone examples.

May 22 '12 at 05:50 PM rubenpvargas
(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x2028
x143
x50

asked: Apr 12 '12 at 01:40 AM

Seen: 1356 times

Last Updated: May 22 '12 at 05:50 PM