Accelerometer - Turning?

tripleehentertainmenttripleehentertainment Member Posts: 52
edited November -1 in Working with GS (Mac)
My iPhone is in "right landscape" orientation. I want to be able to move left or right based on "turning" the iPhone in that direction.

You could think of this like a car steering wheel.

As of now I base movement off of the "Y" Accelerometer value (max( self.minSpeed ,min( self.maxSpeed , self.maxSpeed *abs( game.Accelerometer.Y )))), However that means the user must push in the left or right side of their iPhone to move.

Could someone help me do this?

Thanks.

Comments

  • scitunesscitunes Member, Sous Chef Posts: 4,047
    one thing you could do is download a free GS made app called iDevices. It allows you to hold your device at any angle and it gives you the X,Y,Z values. It gives other info about touch coordinates as well.

    http://itunes.apple.com/us/app/idevices/id343351276?mt=8

    It may help you solve the problem. Fire up iDevices, hold the phone the way you want, and then tilt as if you are turning and read the iDevices data to get an idea of what is going on.

    Very useful app.
Sign In or Register to comment.