have a screen_drag without a screen_touch event

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

Hey guys,
Is it possible to get a screen_drag event that will not also trigger a screen_touch event ?
I was thinking of something like this:

	if(event.type == InputEvent.SCREEN_DRAG  and not event.type == InputEvent.SCREEN_TOUCH):

but it doesn’t seem to make a difference. ~thanks

:bust_in_silhouette: Reply From: eons

A drag event happens between two touch events.
What you can do is to delay a touch action waiting for drag, if there is no drag after some frames or seconds, do something just for touch.
If on drag mode and a touch even happens, it may be a release and drag must stop.

Is more easy if you just wait for touch release, if you didn’t got a drag event before release, it was a tap (this is useful if you don’t have tap&hold actions).

Always check touch index too, you don’t want weird multi touch response.

yup I thought so too, I was just making sure is not something easier and obvious that I’m missing. thanks

MrMonk | 2017-03-30 19:13