New Input System touch screen lag

I have a problem with the cursor lag on the touch screen. Here’s what’s shown in my video:

  1. White circle - Android system cursor label.
  2. Red square - Input.touches[0].position in the old Input System
  3. Green square - InputSystem.EnhancedTouch.Touch.activeTouches[0].screenPosition in the new Input System
    I also tried using actions, dynamic/fixed/manual update modes. Nothing helped to reduce the latency.
    Have there been any improvements on this issue in the new InputSystem?

I’m also experiencing this
As a bonus point, touch.startTime is delayed like this too, so you can’t even rely on that!!! :slight_smile:

The only solution I’ve ever had for responsive Unity touch is NativeTouch, but IL2CPP broke that on Android.

This issue has been present since the dawn of time it seems with Unity, somehow a third party asset can get it right, but it broke with IL2CPP


7759173--977184--upload_2021-12-23_22-12-14.png

Actual touch start time, as seen by Androids touch cursor: 148.559
Unity reports Touch.startTime is 148.593
That’s 34ms of unaccounted for delay. Making it literally impossible to use this engine for any kind of application requiring responsive touch.

The worst part is it’s not even consistent! A single touch in this recording was on the mark.
I can’t even add any kind of input calibration because it’s essentially random.

7759173--977187--upload_2021-12-23_22-15-41.png

Unity 2020.3.21f1 LTS
Input system 1.2.0
Querying Touchscreen.touches[0] and saving time on Phase.Began

Also tested

  • input system 1.0 (rather than 1.2)
  • onEvent instead of touchscreen.current.touches
  • polling rate of 500f

No improvement on all three fronts.

Awch. At lower framerates I’m experiencing 60-200ms delays in touch timing with EnhancedTouch.Touch.onFingerDown
Using the .startTime from Touch still (TTime) while Time is realtimeSinceStartup

7817046--988950--upload_2022-1-17_14-47-37.png
7817046--988953--upload_2022-1-17_14-47-41.png

It’s very frustrating. I’m making non-gaming app, and if I knew about this issue before, I like be switching from Unity.

Is Unity team even consider this an issue?