0 votes

I know we're supposed to report bugs on GitHub, but I'm a newb so want to make sure I'm not just newbing out.

I have a Control node with the following script inside it:

func _gui_input(event):
if event is InputEventScreenTouch:
    print("Screen was touched!")

When I touch the control, the sound is played. When I lift my finger the sound is played again. That all seems right. However if I touch the control (sound played), keep my finger pressed to the screen, and then move it outside the control before lifting it, the sound is still played again even though I am outside the bounds of the control.

When using the mouse on my computer using similar mouse input logic, these boundaries are respected no problem.

This isn't the only inconsistency I've found between mouse and touch control, but this seems like it may be a concrete bug that could lead to some farther reaching improvements if fixed.

InputEventScreenDrag acts similarly (it keeps triggering even outside the node until I lift my finger).

Should I report this you think??

asked Jun 7, 2019 in Engine by Greg.game (14 points)

I'm not 100% sure, but InputEventScreenTouch may report touchscreen events even when you tap off the node. Maybe you could rewrite it to use the _input() function? Maybe things would be different?

Thanks but _input is too generic. Need it handled by a control. Tried _input but led to nonstop triggering.

Hey Greg.game, me being a newb as well I've been trying to find a solution to exactly this problem since weeks by now, to no avail. Have you been successful in the meantime?

It appears there are one or two tweaks concerning buttons (and especially on touch screens) that are, just like this one, just not covered properly yet. I'm dreaming of a full-fledged touch screen button functionality line-up to fulfill all needs and wishes... *: )*

Please log in or register to answer this question.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.