Accelerometer Problem

My game uses the accelerometer to control a ball. Most of the time when I test the game on my phone via gamesalad viewer or the actual app it works as expected. Occasionally after starting the app a few hours later the accelerometer doesn't work. This is extremely frustrating and I don't understand why. I have keyboard controls in the game too, but they are positioned after the accelerometer controls. If anyone knows a fix or something please let me know. (possible use a calibrater?)

Comments

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949

    The accelerometer doesn't work.

    Have you used a Display Text behavior to watch the value of the accelerometer attribute you are controlling the actor with? If you start the game a few hours later, what does the value start at?

  • MattButlerStudiosMattButlerStudios Member Posts: 486

    @tatiang‌ Thanks I will try that. Whenever it starts up after a couple of hours the only way to get the accelerometer to work it to jerk the device to one side very harshly, which makes me think that the 0.1 accelerometer setting is changing.

  • MattButlerStudiosMattButlerStudios Member Posts: 486

    @tatiang‌ I just tested it and it didn't pick up a reading until
    x 2.744492
    y 0.2191315
    z 0.3076935

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949

    @MattButlerStudios It's hard for me to know what those numbers mean without knowing how the device was oriented (e.g. portrait or landscape) but I'll guess that you were moving the device and... nothing showed up on the Display Text until you reached those values. Is that correct? Or did 0 show up until you reached those values?

  • MattButlerStudiosMattButlerStudios Member Posts: 486

    I believe that nothing was showing up until the values. My orientation is portrait

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949

    This could be a bug related to when a device wakes. I'd recommend submitting it to Support. You can find the link by clicking on the Help menu at the top of the forums.

Sign In or Register to comment.