New Capx For Your Excitement - More Touch Tests

0 favourites
  • 2 posts
From the Asset Store
Surena Touch
$2.50 USD
A wrap from official Touch plugin to export touch/mouse input to other plugins.
  • darksunpictures.com/public/More_touch_tests.zip

    I was trying to track 2 touches explicitly (because there is a lot of implicit stuff going on in the other one).

    This one fails when you hold the second touch (which becomes the first touch then) and then try to do another second touch.

    Can anyone assist with this?

    I was trying to do it with flags initially, but I got lost in the logic, so I did it while counting the blue and cyan squares on screen (the two different touchpoints).

    I still may redo it in the fashion of the first provided capx.

    This is just a learning experience.

    Interestingly, this one becomes unstable when you move line 60 past line 68.

    Can anybody tell me why?

    [Also, the "I am not a robot" captcha strikes right to my core.]

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • AmpedRobot

    just saw this now... using Touch 0 and Touch 1 will probably only lead you into trouble.

    Because the index of the touches changes as new ones come and go... (which is what you discovered when you held the second one but let go of the first one).

    I think it is best to do it the implicit way from the sample I made last time.

    where you only have one "On Any touch start", "Is in touch", and "On Any touch end"

    those sections create, track, and destroy all the touchpoint objects (by TouchID) so there is no confusion.

    then it is up to you (using instance variables, or other ways) to define what the touch is supposed to do.

    I think that also makes things better for the player too - so that they don't have to know that something will only work with one touch, and something else with two touches - especially if their thumb is on the edge and they don't know it...

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