func _input(event):
if event is InputEventScreenTouch:
print("Touched")
if not dragging and event.pressed:
dragging = true
draw(get_global_mouse_position())
if dragging and not event.pressed:
dragging = false
if event is InputEventScreenDrag and dragging and event.pressure != 0:
draw(get_global_mouse_position())
When I run it on mobile, it just doesn’t work. It should at least print out “Touched”, but it doesn’t. I know for a fact that it works though, since i have “Emulate touch from mouse” enabled and it works when I run it on PC. What might be causing this?
It just doesn’t print anything. It only detects InputEventPanGesture and InputEventMagnifyGesture when I use two fingers, but nothing when I use one finger or a pen.
I found out the problem, it was actually very simple. There were some Control nodes with their mouse_filter on Stop and they were stopping the input. Mentioning _unhandled_input made me think of that. Thank you for helping me!