Hey guys!!
Reading the tutorials, to my understanding so far, a 2D openGL surface has its origin at the bottom-left corner.
Since I'm porting a game that performs all the calculations considering that any 2D surface should have its origin in the top-left corner, I wanted to find a way to reverse the Y coordinate system used by libGDX.
Searching the internet, I found a guy with the same problem as me and a given solution:
http://stackoverflow.com/questions/7708379/changing-the-coordinate-system-in-libgdx-java
I copy-pasted the camera code into B4A but it didn't work, I'm guessing it's because it's in Java.
Can anyone help me with this? Perhaps @Informatix
EDIT: SOLVED!!
...and after setting the dimensions of the region to be rendered:
Sorry for bothering...
Reading the tutorials, to my understanding so far, a 2D openGL surface has its origin at the bottom-left corner.
Since I'm porting a game that performs all the calculations considering that any 2D surface should have its origin in the top-left corner, I wanted to find a way to reverse the Y coordinate system used by libGDX.
Searching the internet, I found a guy with the same problem as me and a given solution:
http://stackoverflow.com/questions/7708379/changing-the-coordinate-system-in-libgdx-java
I copy-pasted the camera code into B4A but it didn't work, I'm guessing it's because it's in Java.
Can anyone help me with this? Perhaps @Informatix
EDIT: SOLVED!!
B4X:
Sub LG_Resize(Width As Int, Height As Int)
'Sets the camera viewport
Camera.Initialize
Camera.SetToOrtho2(True, lGdx.graphics.Width, lGdx.Graphics.Height)
End Sub
...and after setting the dimensions of the region to be rendered:
B4X:
actor(active_actor).Flip(False, True)
Sorry for bothering...
Last edited: