SCREEN_DRAG doesnt trigger?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Scayze
:warning: Old Version Published before Godot 3 was released.

Hey everyone!

Im using SCREEN_DRAG to move my player over the screen.
The problem is, that when i hold my finger on a constant postion on the screen the SCREEN_DRAG stops triggering. resulting in stuttering/stopping moving of my character.

Any help?

:bust_in_silhouette: Reply From: rustyStriker

The SCREEN_DRAG is only when you have moved your finger, you can use SCREEN_TOUCH to find a single touch on a single point.
but be ware that once you moved your finger a little bit it would count as a SCREEN_DRAG.

the touch support right now is kinda sh*t so try avoiding the use of _input() and try using more screen buttons(or whatever its called) and some custom masks to set the game if you can

so basicly there is no way for godot to realize a constant fingertouch? is there any workaround?

Scayze | 2016-10-29 10:57

you can use:

if event.type == InputEvent.SCREEN_TOUCH or event.type == InputEvent.SREEN_DRAG

that way he will read both for the same block of code.

rustyStriker | 2016-10-29 12:09

But as far as i understood, SCREEN_TOUCH only triggers on press & release, not on constant touch. And Drag only on moving a finger on the screen. Or did i unsterstand something worng?

Scayze | 2016-10-29 12:21

By what i have understood from playing with it on my phone if you want to have a constant touch at the same location you can use:

if event.type == InputEvent.SCREEN_TOUCH and event.pressed:
     some code here

rustyStriker | 2016-10-29 14:10