Android Double tap does not work

Discussion in 'GameMaker Studio 2 Community Tech Support' started by Giulian Almeida, Jan 11, 2019.

  1. Giulian Almeida

    Giulian Almeida Member

    Joined:
    Jan 10, 2019
    Posts:
    5
    Testing in windows works normal, but on my cell phone I have to press several times until at some point it works. What can it be?
     
  2. csanyk

    csanyk Member

    Joined:
    Jun 20, 2016
    Posts:
    815
    Sounds like it is something with the mobile build target, not your code. Without seeing your code, that's tough to say for sure, but since it's working fine on one build target and not another, it seems likely.

    I don't make games for Android or iOS, but have has similar frustration with detecting mouse clicks reliably in HTML5 builds of some of my games, with certain web browsers. I don't know that anything can be done, other than file bug reports to YoYo to look into the issue.

    On the off chance that it is a problem with your code, you might try having a look at my Mouse Double Click asset, available for free in the Marketplace. It provides the basic functionality for detecting two mouse clicks within a short timespan. Screen taps on mobile are handled like a mouse event, if I am not mistaken, so you could either directly use my asset, and hope it works, or you might be able to get something out of looking at my code and figure out your own way to do it.

    https://marketplace.yoyogames.com/assets/1955/mouse-double-click
     
  3. GMWolf

    GMWolf aka fel666

    Joined:
    Jun 21, 2016
    Posts:
    3,164
    What double click doesn't work?
    Are you talking about the double tap event? Or the right click event? Or actually two left mouse button events?

    On mobile platforms, GM will collect double taps into a single, right click event.
    If you want your double taps to register as two distinct taps, you need to deactivate that behaviour using device_mouse_dbclick_enable
     
  4. Giulian Almeida

    Giulian Almeida Member

    Joined:
    Jan 10, 2019
    Posts:
    5
    Thanks man, I put the mouse_dbclick_enable to 0 and now its work :)
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice