+2 votes

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

in Engine by (682 points)

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

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

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

1 Answer

+1 vote
Best answer

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

by (193 points)
selected by

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.isactionpressed("mouse_clicked") and event.doubleclick:
#some action

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

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 Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.