Skip to content

touches Array sometimes doesn't remove objects if touch has ended #714

Closed
@JonLit

Description

@JonLit

With this code example:

void setup() {
  fullScreen();
}

void draw() {
  background(0);
  fill(255);
  for (TouchEvent.Pointer p : touches) {
    circle(p.x, p.y, 400);
  }
}

If I touch with one finger, a circle is displayed (at it's position)
If I touch with a second finger, a second circle is displayed
If I pull up the second finger without changing the position of the first one, the second circle still is being displayed
Only if I move or let go of the first finger, the second circle also disappeares.

Interestingly, the touchEnded() function is still correctly executed when letting go of the second finger.

It's easiest to test this by holding one finger steadily and then tapping with a second.

Tested on the following devices:

moto g5 (LineageOS 19.1 / Android 11)     : Bug occured
Xiaomi 12 Lite (Android 12)               : Bug occured
Samsung Galaxy A5 2016 (Android 7)        : Bug occured
Honor 9X Lite (Android 9)                 : Bug DIDN'T occur

Video Links:
Xiaomi 12 Lite (Android 12)
Galaxy A5 2016 (Android 7)
Motorola moto g5 (LineageOS 19.1 / Android 11)
I don't have a Video of the Honor 9X Lite unfortunately (maybe I'll make one the next few days)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions