Double-click extension not working with touch

Hi, I’m having trouble with the Double-Click extension using touch instead of clicks. A double tap/touch is not recognised on my phone or my touchscreen laptop in the game preview, but works fine when double clicked with the mouse. The original version of the extension on github works fine, but not the updated version from earlier this year that changed the way it recognises inputs. Is it a bug or a me thing?

1 Like

I think the problem comes from “The cursor/touch is on Object”. In my experience, touch controls for that event stop working after the first scene, for some reason.

This could be true if @Bubble used the action “Deactivate moving the mouse cursor with touches”. As far as touch not working after the first scene, that must be a problem with your events or scene properties, otherwise this would be a major bug with reports flooding in.

Perhaps this is relevant:

doubleclick

I wonder if your devices have too high of a double-click sensitivity? Or can it even be disabled completely? Maybe @Silver-Streak and @davy can weigh in :slight_smile:

Yeah I did see that and wondered about it. For the record, I have an add on in my phone Firefox browser that has a little dot on the screen. When double tapped it makes the browser full screen. When I have my phone on the game preview, that double tapping full screen button works.

There was a bug report on github for this extension in March and it had the problem as ‘the double click count is not defined’ but no explanations so there might have been a discussion on discord etc. Anyway, the example event in the bug report had the cursor/touch is on an object in it. So I assume it shouldn’t be a problem.
Update, I removed the on object condition and it still didn’t work.

I don’t really understand this, but my test game has only one scene and about three other events which I disabled.

Ok, I looked at the code again, and think I found what the problem is.

The event says the object has to be double-clicked with the “left” mouse button. I’m assuming this event makes it that the the only way the full event will be triggered is when you use a mouse (left button) to double click the Object, NOT double tap.

As for a way to fix the issue, I don’t know for sure. I haven’t used this extension before, so I don’t know what events it has. If it has an event for double-tapping specifically, then you can use the one, the only OR function to add the event as an alternative way of of triggering the full event.

I hope not. Both the original and updated versions say this

As touch devices do not have middle/right tap equivalents, you will need to account for this within your events if you’re not using the left mouse button and building for touch devices.

So it definitely sounds like just with other left click actions, this is meant to support touch with reference to a left mouse click.

@Yhac10 No, again this is not correct. A tap is a left-click by default. Therefore a double tap would be the same as a double left-click.

I have no idea what you mean by “the full event will be triggered” as all events are either triggered, or not triggered, there is no in-between.

I know you are trying to be helpful and it’s OK to sometimes have wrong assumptions (happens to all of us), but it is best to avoid volunteering information as if it is fact unless you have high confidence in that information.

1 Like

Has anyone reading this tried the extension and confirmed that it is or is not working for them? I updated GD, (for some reason it had not done it automatically), restarted GD, made a new test project and still it doesn’t work on touch screen.

This is pretty extensively reworked from my original release. Basically all of the logic was convered to Javascript and most of the event logic I had there originally no longer remains, so I can’t give much guidance.

From the looks of it, though, it seems like it would only work with Mouse Emulation for input. It looks like it doesn’t work with multitouch in any way.

So if you’re disabling the mouse via settings/events, it’s not likely going to work.

I haven’t changed anything.

If it doesn’t work with multitouch/double tapping then the current wording is misleading.

@davy Could you please comment on whether standard touch is supported with double clicking in this extension?

If the extension doesn’t support it, you could always create your own double-click functionality by checking and restarting a timer whenever a click is registered. Then, you can check if the timer value is less than 0.25 seconds or whatever you want the threshold to be, if so then that’s a double-click. (make sure to check the value before restarting :P)

Yes absolutely, or just use the original working extension. But I am interested in the updated one as it has code in the JavaScript specific to differentiating between dragging and clicking. But it would be nice to know for sure what the intentions of this updated extension is.