Accelerometer values reversed between iOS and Android

JensWinterstein

  • *
  • Posts: 433
Sry for the double mentioning but the topic (http://community.stencyl.com/index.php/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

Jon

  • *
  • Posts: 17529
Is this still happening?

rob1221

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

Jon

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

Jon

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

panda84

  • 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.

Ogiul

  • 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: http://giderosmobile.com/forum/discussion/4244/inverted-accelerometer-on-android/p1

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