Search Unity

Resolved Cinemachine lag when move mouse to rotate view

Discussion in 'Cinemachine' started by lionstrike2_unity, Jan 27, 2022.

  1. lionstrike2_unity

    lionstrike2_unity

    Joined:
    Sep 30, 2021
    Posts:
    3
    I made a slight change to the default NestedParentArmature_Unpack prefab, I moved the components out into a main gameobject so that I could apply the setting to different characters later.
    When I move the character, my game works properly. Only when I rotate the camera, my camera jerks (the camera is shifted but not moving smoothly). I use the starter package and only change one line of code. This problem seems to only happen when I do this with a URP project (even when I build the game I still get this error.), the normal 3d project doesn't seem to have this bug.



    My project packpage: https://drive.google.com/drive/folders/1Lna6je_ccv04FKvD7JY5x6_iPve-5nhp?usp=sharing
     
  2. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,730
    It's a known Unity bug that the editor is laggy while the Transform component inspector is open. Try collapsing it and see if you still have the problem.
     
  3. lionstrike2_unity

    lionstrike2_unity

    Joined:
    Sep 30, 2021
    Posts:
    3
    No, it still lag. And I don't understand why. I'm new to unity, maybe when I moving the component missing some setting ?
     
  4. antoinecharton

    antoinecharton

    Unity Technologies

    Joined:
    Jul 22, 2020
    Posts:
    189
    2021.2.7 uses version 1.2 of the Input system package which has an issue with inputs delta when set to fixed update and can cause the lags you are seeing.

    To check if that's the issue you could try this:
    Edit -> project settings -> Input system package
    If Update Mode is set to Process events in fixed update change it to Process events in dynamic update
     

    Attached Files:

    Last edited: Jan 28, 2022
  5. lionstrike2_unity

    lionstrike2_unity

    Joined:
    Sep 30, 2021
    Posts:
    3
    Thank you very much, problem solved. It took me all day to find a solution but I don't see anyone mentioning editing project settings above like you.:rolleyes:
     
  6. codiushmaximush

    codiushmaximush

    Joined:
    Jul 12, 2017
    Posts:
    4
    This finally worked. I was looking for this solution for approximately 4 hours. I thought it was a bug with the input provider, then how the virtual camera manipulated the retrieved input axis. The weird thing is it wasn't causing problems on my machine. In editor or builds it worked fine, but other machines were getting a ridiculous lag about 10x worse than the one in the video. Spent so much time moving the build between my Desktop and my Laptop with a flash drive to check if tweaks worked. I'm so happy it's fixed :)
     
  7. faltek

    faltek

    Joined:
    Feb 2, 2021
    Posts:
    4
    OMG you fixed this for me! Thank you! This needs to be fixed or something - it happens if you update your 2020 project to 2021 I think.
     
    antoinecharton and Gregoryl like this.
  8. antoinecharton

    antoinecharton

    Unity Technologies

    Joined:
    Jul 22, 2020
    Posts:
    189
    It is already fixed but it's a big process to release a new version of the Input system. If you feel adventurous and want to use process events in fixed update it is fixed in develop on the input package repo (Not released yet so no guarantees it will be stable) https://github.com/Unity-Technologies/InputSystem.
     
  9. Pytchoun

    Pytchoun

    Joined:
    Apr 12, 2015
    Posts:
    203
    Hello,

    This bug still not fixed ?
     
  10. bharathn15

    bharathn15

    Joined:
    Jul 22, 2021
    Posts:
    2

    Even I have same issue and tried out what you mentioned but still problem not got solved.
     
  11. bharathn15

    bharathn15

    Joined:
    Jul 22, 2021
    Posts:
    2
    The problem got solved
     
  12. Pytchoun

    Pytchoun

    Joined:
    Apr 12, 2015
    Posts:
    203
    How?
     
  13. axvemi

    axvemi

    Joined:
    Dec 3, 2021
    Posts:
    16
    I got it working using the other mode instead.. Process Events in Fixed Update.
     
  14. Pytchoun

    Pytchoun

    Joined:
    Apr 12, 2015
    Posts:
    203
    What is the difference between this two mode