Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Bug New Input System has more latency then old input (mouse position)

Discussion in 'Input System' started by BaukeHoekstra, Jun 1, 2021.

  1. BaukeHoekstra

    BaukeHoekstra

    Joined:
    Feb 12, 2017
    Posts:
    6
    Context:
    For our game, we use a UI Image as a cursor since we want controllers to be able to move the cursor as well. (Unity 2019.3.18f1 LTS)

    Issue:
    When making the cursor I noticed quite some delay using Player Input Invoke Unity Events (some delay is expected since we are not using the hardware cursor, but this is not usable). So I tried setting the cursor position in the Update function, this made it a little bit better. After this, I enabled the old input system again and tried setting the position with that. This improved the latency between the hardware cursor and UI cursor by a lot. Why does the new input system have more latency with the mouse (and maybe other inputs as well)?


    Reproduction:
    1. Create a new project and import the Input System
    2. Project Settings -> Player -> ActiveInputHandeling -> Both
    3. Debug the mouse position (while moving the mouse) using the new and old input system
      • Input.mousePosition
      • Mouse.current.position.ReadValue()
    4. See the discrepancy in the mouse position (old input always ahead)

    Also tested in unity 2020.3.10f1 LTS
     
  2. dmytro_at_unity

    dmytro_at_unity

    Unity Technologies

    Joined:
    Feb 12, 2021
    Posts:
    212
    Hi please report it as a bug (via help -> report a bug) so we can keep track of it in the system.

    On top of my head the latency should be fairly similar between old and new, but maybe there is one frame delay hidden somewhere non-obvious.

    Which platform it reproduces on?
     
  3. dantesryu

    dantesryu

    Joined:
    Oct 3, 2018
    Posts:
    7
    It is also happening in 2020.3.25f1.
    I'm using the mouse position to do a ScreenPointToRay and the latency is so high.
     
  4. Upp000

    Upp000

    Joined:
    Mar 4, 2021
    Posts:
    96
    I switched to the new input system to fix this delay issue, very disappointed that it fixes nothing. What is the point of the new system if it fixes nothing? It is not convenient to use compared to the old one.