1. Check out our companion app, Forums for Android! Download from Google Play

Noob Question regarding LunarLander sample

Discussion in 'Application Development' started by Smills29, Jul 20, 2010.

  1. Smills29

    Smills29 New Member
    Thread Starter
    5

    Jul 20, 2010
    4
    0
    5
    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...
     

    Advertisement

  2. jungajuice

    jungajuice Active Member
    16

    Mar 30, 2010
    31
    1
    16
    Male
    Lead Android Developer at TuneWiki
    Santa Monica, CA
    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.
     

Share This Page

Loading...