Android [SOLVED] Tap Gesture Bugs

Discussion in 'Programming' started by etbunce, Jan 4, 2019.

  1. etbunce

    etbunce Member

    Joined:
    Jan 4, 2019
    Posts:
    12
    I've been trying to get a feel for how gesture events behave, so I created an object that alternates color between red and blue when tapped and turns yellow when double-tapped. It works just fine, except:

    The app seems to only accept a tap about every third of a second, or multiple taps that occur at the exact same time.

    This means quick double-taps don't register, so I have to wait a short moment for the second tap to register and trigger the double-tap event. Also, I'm unable to rapidly change the color of the object by tapping quickly. I feel like this could present major problems in the future. Is there something wrong with my setup or is this just how GameMaker Studio is? Have any of you also encountered this? I also had this problem in GMS 1.4.

    Even if you don't have this problem, I'd be interested to know.

    I've tried building with both VM and YYC, and even running an installed APK. Same problem.
     
    Last edited: Jan 4, 2019
  2. Nocturne

    Nocturne Friendly Tyrant Forum Staff Admin

    Joined:
    Apr 13, 2016
    Posts:
    6,901
    Okay, the first thing I'd do is disable the general mouse double-tap detection. By default, a double tap will also trigger a RMB event, and I don't know if that may interfere with the actual gesture events. The function is device_mouse_dbclick_enable(). The next thing I'd do is look at changing the timing of the double-tap using GML. There are a load og Gesture functions that control how various things work, and in particular you'll want to look at gesture_double_tap_time().

    Hope that helps!
     
  3. etbunce

    etbunce Member

    Joined:
    Jan 4, 2019
    Posts:
    12
    Ah yes that worked great, thank you! Just disabled device_mouse_dbclick_enable. However, now that taps can register consistently, I'm noticing that any double taps (either globally or for an instance) can only trigger once between each drag start or drag end event. Here's an example:

    1. I double tap, and the double tap event triggers.
    2. Double tap again and again, does not trigger (but individual tap events do trigger).
    3. Drag my finger
    4. Double tap, the event triggers once more, but no more until I drag my finger again.

    Any clue for this weird thing?
     
    Last edited: Jan 5, 2019
  4. Nocturne

    Nocturne Friendly Tyrant Forum Staff Admin

    Joined:
    Apr 13, 2016
    Posts:
    6,901
  5. etbunce

    etbunce Member

    Joined:
    Jan 4, 2019
    Posts:
    12
    Last edited: Jan 6, 2019

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