I have a problem with HTC Desire and accelerometer orientation, sometimes I get x and y axis inverted (x becomes -x and y becomes -y, so accelerometer sprite control is inverted).
These are my engine options:
final EngineOptions engineOptions = new EngineOptions(true, ScreenOrientation.LANDSCAPE, new RatioResolutionPolicy(CAMERA_WIDTH, CAMERA_HEIGHT), camera).setNeedsSound(true);
I traced a problem to this file:
/src/org/anddev/andengine/sensor/accelerometer/AccelerometerData.java
The problem is that sometimes mDisplayRotation is 3 (ROTATION_270) so axis are inverted in swapAxis function.
I am not sure why sometimes I get 270 orientation (usually it's 90 as it should be). It happens maybe in 10% cases, usually after I compile and run from eclipse.
Any ideas?
