Topic was automatically imported from the old Question2Answer platform.
Asked By
Hyperbolic
Hello!
I’m building a splash screen with a Sprite and a TouchScreenButton as the child. I connected the released() signal to the screen’s script, but when I press the button nothing happens. I debugged the call function using print, but looks like the function is not being fired. I’m using Godot 3.0 RC3. Is there anything I can do? Thank you.
TouchScreenButton is for touch
I assume you tested it on PC.
if you want to test it on PC,
set Emulate Touchscreen option is On at ProjectSettings > Display > Window
I forgot to say that I already enabled the touch screen simulation. My apologize.
Hyperbolic | 2018-01-30 19:57
There is no “Emulate Touchscreen” option in ProjectSettings > Display > Window, or anything even remotely similar to that. Where should I enable the setting?
Also, if I enable it, will it work in exports as well? That is, when the game is done, will exports for PC be able to interact with the touchscreen button?
I found the solution!
I have a scene as singleton that handles the transition between scenes. It’s a CanvasLayer root node, so I couldn’t press the button because the layer were blocking the button. I fixed the problem changing its layer during transition and turning back to original layer when finished.
From Godot v3.1 the location for emulating touch from mouse has changed:
Project > Project Settings > General > Input Devices > Pointing setEmulate Touch From Mouse to On