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

Bugs will be moved here once resolved.

Post » Fri May 08, 2015 8:37 pm

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
Last edited by Rable on Sat May 09, 2015 7:34 pm, edited 1 time in total.
B
32
S
6
G
1
Posts: 353
Reputation: 2,821

Post » Fri May 08, 2015 8:57 pm

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"
Image ImageImage
B
170
S
50
G
179
Posts: 8,378
Reputation: 113,425

Post » Sat May 09, 2015 6:48 am

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 :

Image

and this one (using IDs)

Image

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.
B
32
S
6
G
1
Posts: 353
Reputation: 2,821

Post » Sat May 09, 2015 2:55 pm

I should have said all touches.
There is a difference between touch.x, and touch.Xat
https://dl.dropboxusercontent.com/u/666 ... ultix.capx
Image ImageImage
B
170
S
50
G
179
Posts: 8,378
Reputation: 113,425

Post » Sat May 09, 2015 5:30 pm

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)
B
32
S
6
G
1
Posts: 353
Reputation: 2,821

Post » Sat May 09, 2015 6:03 pm

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.
Image ImageImage
B
170
S
50
G
179
Posts: 8,378
Reputation: 113,425

Post » Sat May 09, 2015 7:36 pm

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!
B
32
S
6
G
1
Posts: 353
Reputation: 2,821


Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 1 guest