- Edited
Hi, i'm currently trying to built a simple game for android with a player moving to a location pressed using InputEventScreenTouch, and jumping when i swipe up using InputEventScreenDrag.
i have set up a simple node2d scene to run and test the input, this is the code: func _input(event):
if event is InputEventScreenTouch:
if event.is_pressed():
print("touched")
if event InputEventScreenDrag :
print("dragged")
when i touch the screen the InputEventScreenTouch fires up and prints touch, but the problem is when i drag it looks like the InputEventScreenTouch prints touched aswell and right after InputEventScreenDrag works just fine, but that initial touch always happends no matter which way i go about it, any advice? thanks!