Sub GD_TouchDown(X AsFloat, Y AsFloat, Pointer AsInt) As Boolean
Dim poVect As lgMathVector2
' calculate where we touched
poVect.X = X
poVect.Y = Y
poVect = MainStage.ScreenToStageCoordinates(poVect)
Dim piX As Int = FromPixelToTile_X(poVect.X)
Dim piY As Int = FromPixelToTile_Y(poVect.Y)
LogColor("GD TOUCH Map Pos: " & piX & ", " & piY, Colors.Magenta)
Return False
End Sub
Sub GD_TouchDown(X AsFloat, Y AsFloat, Pointer AsInt) As BooleanDim poVect AslgMathVector2
' calculate where we touched poVect.X = X
poVect.Y = Y
poVect = MainStage.ScreenToStageCoordinates(poVect)Dim piX As Int = FromPixelToTile_X(poVect.X)Dim piY As Int = FromPixelToTile_Y(poVect.Y)
LogColor("GD TOUCH Map Pos: " & piX & ", " & piY, Colors.Magenta)
ReturnFalseEnd Sub
Dim piX As Int = FromPixelToTile_X(poVect.X)
Dim piY As Int = FromPixelToTile_Y(poVect.Y)
There's a complete solution in the libGDX tutorial thread.What is 'MainStage' in your project?
FromPixelToTile give error. The compiler does not recognize itB4X:Dim piX As Int = FromPixelToTile_X(poVect.X) Dim piY As Int = FromPixelToTile_Y(poVect.Y)
Jefrey could you post the complete and running code?
I can not understand![]()