UserInputService.TouchPan does not register multiple touches

UserInputService.TouchPan is described on the dev hub as being able to support multiple touches along with other information about the pan action.

However in practice the touchPositions array only ever has 1 touch position when multiple fingers are touching the screen.


Repro:

  1. play the repro place (link below) on a mobile device
  2. touch the screen with multiple fingers
  3. observe the debug text and touch position debug guis only displaying 1 touch

I can repro this behavior 10/10 times. I’m testing on a Pixel 3XL running android 10 (QP1A.190711.019) on the Roblox app version 2.398.332127


repro place (uncopylocked): .TouchPan bug repro place - Roblox
repro place source: -- found in the repro place under StarterGui.ScreenGui.LocalScript-- https://w - Pastebin.com
TouchPan doc page: UserInputService.TouchPan

2 Likes

thanks for the report. I believe this currently works on iOS, but not Android. We will look into this

2 Likes

This is still an issue on android, or has started again if it was ever fixed. touchPositions only ever has one entry.

I would like to point out that this issue is still recurring and it needs to be fixed for developers to be able to make proper mobile functionality for their games. I have personally been frustrated trying to figure out why it was working on my iPad while testing but not on an Android device, only to realize that it is a bug with the engine which has not been fixed yet.

1 Like

As a workaround you can manually track fingers by listening to .InputBegan and untrack them with .InputEnded. The Input object passed in both of those event will be consistent per finger.

I made a library for handling this a while ago local userInput = game:GetService("UserInputService")local players = game:GetS - Pastebin.com . It requires a signals class and I’ve linked one in the script that will work with it.

3 Likes