when 3 or more touches simultaneously press on screen, they won't register. | Android

Hi, I’m using the following code to detect touches

[RequireComponent(typeof(CanvasRenderer))]
public sealed class PointerDragListener : Graphic, IBeginDragHandler...
{
    ...
    public void OnBeginDrag(PointerEventData eventData)
    {
        ...
    }
    ...
}

When I press 2 touches simultaniously, it works OK, but when I press 3 touches simultaneously, none gets registered. I’ve turned AndroidFilterTouchesWhenObscured off. My phone is a Xiaomi Redmi, and 3-fingers-swipe-down just happens to be a shortcut for screenshot. is that the OS filtering the touch? am i doing it wrong?

thanks

Excellent theory. Test it! Make a little script that watches touches:

  • when a touch starts, spawn a cube under the finger
  • when a touch moves, move the cube
  • when a touch ends, remove the cube.

Or just spew the Input.touches.Length value out the Debug.Log()

1 Like

right, I’d totally forgot about the Input.touches APIs. Yeah a simple test proved OS is indeed filtering the touches. Thanks for the suggestion!

1 Like