Quick accelerometer question...

I've got a level that utilizes the device accelerometer. Hold it like a steering wheel and gently tilt left or right for the character to move left or right. I've got the code to work whether you hold it with the volume buttons facing up or down. However, once in a blue moon it seems to get stuck- meaning the character goes in the opposite direction (because its holding onto, i'm assuming, the device being held a different way before). Is there any way of ensuring this doesn't happen? Or a way to ensure the device resets itself so it can better detect how the player is holding it (ie landscape left or right).
Thanks!

Comments

  • FallacyStudiosFallacyStudios Member Posts: 970
    Not sure if this is the same thing, but I've worked on a marble labyrinth game and if you tilted past the device being vertical in landscape it would go into a neutral no moving. I couldn't figure out what was causing that either nor could I get a response as to any suggestions. So I'd be interested to know if anyone has any idea as well.

    Sorry I can't offer a fix or suggestion. I was stumped on that too (assuming the issue is related).
  • gamesfuagamesfua Member Posts: 723
    @fallacystudios thanks for the discussion. Yeah it could be related. Hopefully someone hase experience with this question.
Sign In or Register to comment.