Multi touch failing (...) [NOT A BUG - RESOLVED]

0 favourites
  • 7 posts
From the Asset Store
2D fighting template based in the game that defined the fighting games genre.
  • Thanks to newt for showing it was not a bug, why, and how to resolve the problem.

    Sorry for the inconvenience.

    -------

    Problem Description

    When using multi-touch (touching 2 points), releasing the second touch before the first one will cause bugs.

    Attach a Capx

    https://www.dropbox.com/s/pq2y1jc2deupg ... .capx?dl=0

    Description of Capx

    When releasing a touch on the right side of the screen, creates a red rectangle at a random position

    When releasing a touch on the left side of the screen, creates a blue rectangle at a random position

    Steps to Reproduce Bug

    • Touch left side (keep)
    • touch right side
    • release right side
    • release left side (also fails when inverting all the lefts for rights and vice-versa)

    Observed Result

    When releasing right, blue rectangle appears

    When releasing left, blue rectangle appears too

    Expected Result

    Red rectangle appears, then blue rectangle appears.

    Affected Browsers

    • Chrome: YES
    • Safari : YES
    • FireFox: untested
    • Internet Explorer: untested

    Operating System and Service Pack

    iPad : iOS 8.3

    Android 4.1.2

    Construct 2 Version ID

    r204.2

  • By your own logic touch.x at the time of the release is less than 160.

    If you want multi touch you should use "On nth touch end"

  • Negative,

    • Touch left side (keep)
    • touch right side (keep)
    • release left side
    • release right side

    produces the desired result. Following your logic, it should also produce 2 rectangle of the same color.

    Furthermore, the following codes :

    and this one (using IDs)

    produce the exact same result as the one in the first post.

    If you manage to have the correct behavior, could you share the event sheet, so that I could edit my post to say that this is not a bug (and know how to resolve my problem)?

    Thanks.

  • I should have said all touches.

    There is a difference between touch.x, and touch.Xat

    https://dl.dropboxusercontent.com/u/666 ... ultix.capx

  • Thanks a lot for your time on this capx. This is very interesting!

    Actually, in your capx,

    • Touch right side (keep)
    • touch left side (keep)
    • release right side
    • release left side

    produce the desired result : creates a red rectangle, then a blue rectangle.

    However,

    • Touch left side (keep)
    • touch right side (keep)
    • release left side
    • release right side

    Still produces two blue rectangles instead of blue, then red. So I'm afraid at the moment we still have to consider this as a bug.

    I tested it on iPad (preview over wifi), android 4.1.2 (preview over wifi and crosswalk export)

  • Look at the texts. Touch 1 becomes touch 0 when you release it.

    You will probably have to go beyond touch end, and incorporate on touch start as well.

    Possibly saving the xys to variables.

    So still not a bug, just the logic is different than expected.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Oh, awesome! I've been able to get everything right by using touch.XforID along with on Nth touch start/end.

    Thanks a lot, and sorry for the inconvenience!

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