Accelerometer values reversed between iOS and Android


  • *
  • Posts: 432
Sry for the double mentioning but the topic (,18524.0.html) wasn't moved to the Bugs sub-forum... so maybe it was overseen.

I recognized that the accelerometer values for both, x- and y-axis are reversed between iOS and Android targets (even without having auto-rotate enabled).

i.e. after setting an actor's x-speed to a positive multiplicated x-accelerometer value, the actor moves to the right on Android but to the left on iOS when tilting the device to the right.

Not a crucial thing though. Testgame attached.

« Last Edit: May 28, 2013, 11:09:37 am by Jon »
Get 100 Chambers for Android / iOS
Get Cubus Velox for Android / iOS or play it on Flash

- Portfolio


  • *
  • Posts: 17524
Is this still happening?


  • *
  • Posts: 9472
I worked with someone on a game recently and he said the accelerometer was reversed.


  • *
  • Posts: 17524
OK, I've now made it so the Android value is now the default.


  • *
  • Posts: 17524
Can you verify the fix?


  • Posts: 28
I have found that in portrait mode, with auto-rotate disabled of course, that the X values at least are inverted between android and iOS.  The Android phones I have tested on are galaxy note 3 (4.4) and HTC desire X (4.1). Was this supposed to be fixed? It's not really a huge issue as I can just do a check and apply the appropriate values I just thought I would post that it is still inverted as of Stencyl 3.1 on the devices above.


  • Posts: 229
For me (ipad3 vs t705 galaxy tab)
iOS X = Android -Y

Is that always true? I looked around and it seems it isn't:

What can I do to solve this issue in my game using Stencyl?