Quantcast
Channel: Question and Answer » libgdx
Viewing all articles
Browse latest Browse all 434

LibGDX input y-axis flipped

$
0
0

I’m writing a game in Java for Android using LibGDX, and I connected my phone so I can test it on it.

I know that LibGDX’s render system works different than regular Java systems since the 0,0 coordinate is in the lower-left corner, while in java it usually is in the upper-left corner.

But now I use the touchDown method out of the GestureListener class, it’s like the regular Java rendering system: when I obviously tap in the left down corner of my screen, I debug-messaged the coordinates and it says it’s Y-coordinate is 475, while I render the object at 0,0.

enter image description here

Is there a way to fix this easily?


Viewing all articles
Browse latest Browse all 434

Trending Articles