Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | ishfwilf |
My input detector looks like this:
func _input(event):
if event is InputEventScreenDrag:
if event.speed.y < -10:
emit_signal('up')
elif event.speed.y > 10:
emit_signal('down')
return
elif event is InputEventScreenTouch:
if event.pressed:
if event.position.x < get_node("../ship").get_viewport_rect().size.x/2:
emit_signal('touched', "left")
else:
emit_signal('touched', "right")
return
The main issue currently is that no matter if it’s a Touch or a Swipe, both if event is InputEventScreenDrag
and elif event is InputEventScreenTouch:
seems to be coming true, all the time.