0 votes

I have this hierarchy:
gamepad -> HBoxContainer (root)
-joystick_space -> CenterContainer
-joystick -> TextureFrame (Script here "Joystick.gd")

i am emulating a analog joystick for a platform game and i test on the editor emulating touchscreen (This is enabled in project settings), suddenly, my code stop working, so i print event.type to see what is going on and i see the value is 2 (That value is for mouse motion) and 3 (mouse touch), but value 7 and 6 doesn't appear anymore. I started the project again from scratch but the problems continue. For some reason in collision objects inputevent can handle screen touch. I enable unhandleinput(event) and here the screen touch appears, but this doesn't work for me. I need to handle the event in inputevent. Each node have ignoremouse = false, and stopmouse = true. And i test every combination and nothing. I just have in the code this:

_ready():
   set_process_input(true)
   set_process_unhandled_input(true)

 func _input(event):
    print (event.type)  #screen touch doesn't appears

 func _input_event (event):
    print(event.type) #screen touch doesn't appear. But when a started the project, it do

 func _unhandled_input(event):
    print (event.type) # screen touch appears. But here doesn't works for me

Sorry the english.

in Engine by (18 points)

looks like this
https://github.com/godotengine/godot/issues/9981

it got fixed for 3 but not for 2.

Thank you! So, I will use unhandle_input. :(

Please log in or register to answer this question.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.