Search Issue Tracker

By Design

Votes

2

Found in

2019.4

2020.3

2020.3.9f1

2021.2

2022.1

2022.2

Issue ID

1405146

Regression

No

[Android] Input.GetTouch function first coordinates position data is affected when screen touched with multiple fingers

Android

-

Reproduction steps:
1. Open the attached Unity project "InputIssue.zip"
2. Open "Test.unity" Scene from the Scenes folder
3. Build and run the application on a device
4. When the application opens, move one finger on a screen
5. Observe the "X" and "Y" coordinates
6. Press and hold with one finger on a screen
7. Tap and drag a second finger on a screen
8. Observe the "X" and "Y" coordinates

Expected result: The "X" and "Y" coordinates in the application stay the same
Actual result: The "X" and "Y" coordinates in the application changes

Reproducible with: 2019.4.36f1, 2020.3.29f1, 2021.2.14f1, 2022.1.0b10, 2022.2.0a6

Reproduces with these devices:
VLNQA00006 - Samsung Galaxy S7 (SM-G930F), OS: 8.0.0, CPU: Exynos 8 Octa (8890), GPU: Mali-T880
(User's info) HTC U11
(User's info) Samsung Galaxy A52

Not reproducible with these devices:
VLNQA00277 - Asus ROG Phone (ASUS_Z01QD), OS: 9.0.0, CPU: Snapdragon 845 SDM845, GPU: Adreno 630
VLNQA00121 - Samsung Galaxy S9 (SM-G960F), OS: 9.0.0, CPU: Exynos 9 Series 9810, GPU: Mali-G72
VLNQA00109 - Xiaomi Mi Note Pro (MI NOTE Pro), OS: 7.0.0, CPU: Snapdragon 810 MSM8994, GPU: Adreno 430
VLNQA00147 - Razer Phone (Cheryl), OS: 8.1.0, CPU: Snapdragon 835 MSM8998, GPU: Adreno 540
VLNQA00219 - Samsung Galaxy Note9 USA (SM-N960U), OS: 8.1.0, CPU: Snapdragon 845 SDM845, GPU: Adreno 630
VLNQA00410 - Galaxy Z Fold3 5G (SM-F926U), OS: 11, CPU: Snapdragon 888, GPU: Adreno 660
VLNQA00022 - Xiaomi Redmi Note 3 (Redmi Note 3), OS: 6.0.1, CPU: Snapdragon 650 MSM8956, GPU: Adreno 510
VLNQA00070 - LENOVO PHAB2 Pro (Lenovo PB2-690M), OS: 6.0.1, CPU: Snapdragon 617 MSM8952, GPU: Adreno 510
LNQA00030 - LG G2 (LG-D802), OS: 4.4.2, CPU: Snapdragon 800 MSM8974, GPU: Adreno 330
VLNQA00034 - Google Nexus 4 (mako), OS: 5.1.1, CPU: Snapdragon S4 Pro APQ8064, GPU: Adreno 320
iPhone 12 Pro (iOS 14.2.1),
iPhone 13 Pro (iOS 15.0.0)

  1. Resolution Note (2022.2.X):

    Input.GetTouch() returns a touch by index in touch array, which is unreliable, touch indices are subject to change, most notably when new touches appear or disappear.
    The reliable way to identify touches is finger id: https://docs.unity3d.com/2022.2/Documentation/ScriptReference/Touch-fingerId.html

    I've modified the users script to showcase it. Note, that finger ids can be reused, so if you lift a finger and put it down again, the new touch may have the same id as the one you had in the past. However, after my modifications it shoud show the coordinates for the first touch and they should be stuck if you put another finger down and lift the first finger (but if you a finger down afterwards, a finger id might get reused and coords will start to change again, but will keep tracking the finger reliably across frames).

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.