0

I am developing a game which uses the accelerometer. I only need to know if the user is tilting the device left or right.

I have following problems:

  1. When the orientation is inverted, the accelerometer is upside-down.
  2. On some devices, the bottom of the game is f.e. on the left side (because of the ratio of the resolution).

To solve this problems I need to know where the bottom of my game is. What would be the best method to decide the actual orientation of the game, as in accelerometer values?

Daniel
  • 19,081
  • 10
  • 86
  • 147

1 Answers1

0

I found a lot of answers on the same problem i.e. finding rotation of mobile in a direction.

@ Best suited for you

and some Helpful answers @ here and here

Community
  • 1
  • 1
Jitender Dev
  • 7,381
  • 2
  • 23
  • 37