When I try my game on the phone (S8) through the Godot editor, the touch input work as expected but when I export the game and install it on the same phone , it doesn't work as expected, as if sometime it register the touch input and some other time it just ignore it.
is there some special settings that need to be changed be fore the export? or maybe my code is wrong. ( I am very beginner )
- it is GLES3 and I only add the package unique name and name before the export.
-and under project settings>Input Devices>Pointing both case are checked
I register the touch through
if event is InputEventScreenTouch:
touch_hold = true
elif not event.is_pressed():
touch_hold = false
touchhold is a Boolean variable
and then I check every frame trough _process() the state of touchhold
if state == 0:
The intent from this code is to be able to know if the player touched his phone the start the game (state=1)
and place an object on the touch coordinate (centerx, centery)
if he is still touching his phone, the game still on if not game over and state =0