Why does the mouse cursor jump to the touch location with "emulate mouse from touch" disabled?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By tomk

Hi, esteemed Godoters!

In project settings, I have both “Emulate mouse from touch” and “Emulate touch from mouse” options disabled.

I’m puzzled by the following behaviour: in my 3D scene I have some touch buttons to control the character and I want to use the mouse independently to point at game objects. The problem is that whenever I touch the screen the mouse cursor jumps in that location. Moreover, the touch generates a mouse click event.
I see this behaviour even with a completely empty test scene, no global scripts loaded etc.

I’m on Windows 11, Godot 3.4.2, Dell XPS 15 with a touch screen.

Is this an engine bug or I am missing something?

Thanks for your answers!

Tom

:bust_in_silhouette: Reply From: Calinou

This is expected for two reasons:

  • On Windows/Linux, using a touchscreen will always move the mouse cursor location. (As of writing, Linux in general has worse touchscreen handling compared to Windows, at least out of the box.)
  • Godot does not support handling touch events on Windows/Linux yet, so there is no way to distinguish them from mouse clicks/drags.