doubleclick doesn't work on Android

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

I use event.doubleclick with an InputEventMouseButton, it worked for PC but not for Android and I wanted to know, why?

I think that’s because that is a MOUSE input event and not a touch event?

Schweini | 2019-08-18 16:35

However I enabled emulate Mouse from Touch, so it should work.

JulioYagami | 2019-08-18 20:46

I don’t think so really. Try to do: InputEventScreenTouch and then try event.doubleclick

Schweini | 2019-08-19 07:28

:bust_in_silhouette: Reply From: Okan Ozdemir

Try to make access from all devices in input mapping. not just mouse 0.

How to make godot detect the double click from an action in Input Map?
I’ve created an action “mouse_clicked”. Added:

  • mouse button index: Left Button
  • Device: All Devices.

Then in the code I do:
if event.is_action_pressed(“mouse_clicked”) and event.doubleclick:
#some action

On Windows this works but not on Android.
Emulate Mouse from Touch is on.

Cez | 2020-04-13 20:16