Skip to main content
Participant
January 10, 2011
Question

Accelerometer starting position AS3 for Android. Help please.

  • January 10, 2011
  • 1 reply
  • 901 views

I added the accelerometer fucntion to my app for android using AS3. It works great.

The only issue I am having is the starting orientation of my mobile device. It seems like it has to lay flat in order to center movement.


I want it so that I can hold the device in my hand and tilt up and down in landscape mode. Like a 45 degree angle maybe. What is the code for this? Anyone?

This topic has been closed for replies.

1 reply

funkysoul
Inspiring
January 10, 2011

you need to find out what the value would be by holding the device at the desired angle and then add or remove that delta value from the sensors output. but normally you start out of a flat positioned device.

Participant
January 10, 2011

Does anyone have code for this? I am not sure if this is done in AS3 or the android SDK.

I am trying to just use AIR for this.