• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps Noob Question regarding LunarLander sample

Smills29

Lurker
I have just tried to add touch input to the LunarLander example (to move the lander to wherever you touch on the screen for testing purposes), and for some reason the y axis is reversed for touch. What I mean by this is: if I touch the top of the screen, the lunar lander jumps to the bottom, if i touch the bottom it jumps to the top, and if i touch the middle it jumps to the middle. X axis is fine.

It can't just be a -Y axis somewhere as that would be off-screen. Any idea what would cause this? I cannot figure it out for the life of me...
 
The coordinates for the y axis start at 0 for the top of the screen and increase as you go down the screen. Basically the top left corner is the origin.
 
Back
Top Bottom