Android Question LibGDX Camera - real coordinates

coldteam

Active Member
Licensed User
Longtime User
Hi,
Try2 move Camera with Player:
B4X:
Camera.Position.Set(Player.x,Player.y,0)

question
how to use lgInputProcessor correctly

when i use:
B4X:
Sub IP_TouchDown(screenX As Int, screenY As Int, Pointer As Int) As Boolean
I get only screen coordinates, not real coordinates
so how can i get real coordinates? maybe some func ?
or must i calc it from camera.position every TouchDown ?
 

coldteam

Active Member
Licensed User
Longtime User
so i calc it like this:
B4X:
RealX = Camera.point.x-(CameraWidth/2)+ScreenX
RealY = Camera.point.y-(CameraHeight/2)+ScreenY
hope its ok )
 
Upvote 0
Top