On tap gesture on object issues

0 favourites
  • 5 posts
From the Asset Store
Full game Construct 2 and Construct 3 to post on Google Play
  • All,

    Looking for some help with tap gestures.

    I have an object with health. It requires two taps by the player to destroy it, but in testing it is requiring three taps to destroy. The issues, from what I can tell, is that when I tap the object it registers the first tap, then the second tap on the object does not register, then the third tap registers as the second tap on the object which destroys it. This is my guess based on when I tap the object once then tap anywhere else and then tap the object again the object is destroyed in two taps.

    Any suggestions, help with this is appreciated. Thanks

    Tagged:

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • You probably think we're gonna get a crystal ball and help.

    Post a screenshot or a c3p file then there's a chance. There's a lot of options for what went wrong.

  • I always advise against using gestures - they are inconsistent and can be laggy.

    Try using 'on touched object' instead and see if you still have issues.

  • Taps are defined gestures and also have single and double-taps. Basically, after the first tap, the engine cannot know yet if you want to perform just a single tap, or a double-tap. So it has to wait for a brief moment to see if you perform a second tap. That brief waiting period can make it feel a little bit laggy and wonky, which can be totally fine depending on the usecase.

    "Is touching object" fires instantly, because It doesn't have to wait for anything. You probably need to add a "Trigger once" though.

    Most likely that solves your issue, but we don't know for sure. There could still be an issue with your eventlogic.

  • Thanks all. WackyToaster that helps to know. I think that was the issues because if i pause for an extra second it registers both taps. I ended up just making an object spawn on tap which removes the health of the object upon collision and it works as intended.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)