|
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.
(comments are locked)
|
|
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. 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)
|
