- Home /
Do Android Accelerometers use a Standardized Coordinate System?
Hey guys,
The root of my problem is that I want some tilt control in my game, which is played in portrait mode.
I've noticed that in portrait mode, iOS accelerometers have the X-axis going left and right and the Y-axis going up and down. In my testing on my Android devices (Nexus One and Xoom), the X-Axis is up and down and the Y-axis is left and right.
First off, do android phones standardize in this way? Can it be assumed that all android phones have this orientation for their coordinate system?
Second, if we can't assume that Android phones are standardized in this way, is there any way to detect during gameplay which orientation the axis are in? I need to figure out which axis is pointing down (x or y) and which is pointing sideways.
Answer by DaveA · May 20, 2011 at 11:03 PM
Don't know about standard, but detection: http://unity3d.com/support/documentation/ScriptReference/Screen-orientation.html
Huh. So when they say "logical orientation", does that mean you can specify the orientation of the screen and the axis will match that, regardless of which way the device is actually being held?
Your answer
Follow this Question
Related Questions
Setting Accelerometer Frequency on Android 0 Answers
accelerometer speed 1 Answer
Player Movement when phone shakes 0 Answers
Accelerometer axis differences on Android and iOS? 1 Answer
android accelerometer left right 3 Answers