Search Unity

Input delay if <= 60 FPS - please answer

Discussion in 'Windows' started by MaZy, Jul 14, 2019.

  1. MaZy

    MaZy

    Joined:
    Jun 29, 2012
    Posts:
    105
    Since this post from me https://forum.unity.com/threads/2019-1-has-vsync-bug.674590/ wasn't answered I try another one.

    Since version 2019.x.x I notice small input delay if I make Buildversion of the game. In the editor is no delay noticeable.

    I also tested with blank project. Just a script with a cube. where I use transform.Translate in FixedUpdate and you can notice it takes like almost 1 sec if you have 30 fps ( vsync -> every second blank). 2018 version hadn't this problem. Also if you check same thing in the editor NO DELAY. But in the build it has delay.

    With 60 fps I notice small delay too. It is like around 0.5 seconds or shorter.

    If I have around 100fps ore more I do not notice it. It is like instantly.

    So what happened? How can I fix it. Like I said 2018.x hadn't this problem.
     
  2. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,674
    Hey, this sounds serious. Are you targeting Windows Standalone player? I suspect a particular change could be causing this behaviour. One of the later 2019.1 patches added a checkbox to player settings called "Use DXGI Flip Model Swapchain for D3D11". Can you uncheck that and see if that changes anything?

    By the way, is there any way we can reproduce this ourselves?
     
  3. MaZy

    MaZy

    Joined:
    Jun 29, 2012
    Posts:
    105
    @Tautvydas-Zilys

    Yes target is windows standalone player.
    If I uncheck "Use DXGI Flip...." then the delay goes away. There is still little delay but its normal for 30 Fps I think (feels like 0.2-0.3 seconds).

    I am not sure. I was using version 2018.x and I upgraded it. I also use a server and the clients connects to the server. There I could see and feel the different.

    I just use transform.Translate in FixedUpdate

    Code (CSharp):
    1.     void ReadInputs()
    2.     {
    3.         if (!player.networkObject.hasControl)
    4.             return;
    5.  
    6.         float h = player.inputs.x;
    7.         float v = player.inputs.y;
    8.         transform.Translate(new Vector3(h, v) * 0.1f);
    9.     }
    10.  

    But anyways. If I uncheck I don't feel a delay.
     
  4. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,674
    Can you report a bug on this? We want to address it.
     
  5. MaZy

    MaZy

    Joined:
    Jun 29, 2012
    Posts:
    105
    I started new blank project. I have there same behaviour.

    Do you mean in the editor itself (Help > Report a bug)?
     
  6. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,674
    Yup! After you do so, you'll receive an email telling you the case #. Post that in this thread.
     
  7. MaZy

    MaZy

    Joined:
    Jun 29, 2012
    Posts:
    105
    I did. I have received Case 1170660
     
  8. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,674
    Thanks! We will fix it.