Accelerometer - Turning?
tripleehentertainment
Member Posts: 52
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.
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
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.