Landscape character accelerometer control.

OK, so what happens now is when I tilt my device up it goes left and when I tilt it down it goes right. Here is my code:

[lua]function onTilt(event)

mandown.x = mandown.x+30*-(event.xGravity)

print(event.xGravity)

end

Runtime:addEventListener (“accelerometer”, onTilt) [import]uid: 184688 topic_id: 32266 reply_id: 128962[/import]

Try yGravity. I think the controls don’t rotate to landscape [import]uid: 7911 topic_id: 32266 reply_id: 128963[/import]

OK hold on. [import]uid: 184688 topic_id: 32266 reply_id: 128964[/import]

OK hold on. [import]uid: 184688 topic_id: 32266 reply_id: 128965[/import]

OMG THANKS IT WORKS!

Although it is a little glitchy it works!

Let me know if you want to see anything!
Avery [import]uid: 184688 topic_id: 32266 reply_id: 128968[/import]

Ur welcome. [import]uid: 7911 topic_id: 32266 reply_id: 128969[/import]

U can try adjusting the accelerometer interval
http://docs.coronalabs.com/api/library/system/setAccelerometerInterval.html [import]uid: 7911 topic_id: 32266 reply_id: 128971[/import]

Yea I did and it works, now I just have to figure out how to get perfect collision detection working.
Also my character right now is round blank circle. Do you know how to switch the characters rotation say on a button press or the change in gravity either one would work but if button press if easier just show that. Right now I have two buttons(up and down) to change the gravity. If I could make the character be upside down when I press up, that would be helpful.
Thanks again,

Avery [import]uid: 184688 topic_id: 32266 reply_id: 128972[/import]

Sorry I figured out how to flip it.
Avery [import]uid: 184688 topic_id: 32266 reply_id: 128973[/import]