Search Unity

Bug Sensitivity issue depending on framerate

Discussion in 'Cinemachine' started by SealDev, Aug 5, 2022.

  1. SealDev

    SealDev

    Joined:
    Feb 13, 2016
    Posts:
    13
    -Unity 2020.3
    -Using a POV, with input value gain 4
    -Framing Transposer
    -Cinemachine v2.7.9
    -Brain set to SmartUpdate, and Blend on LateUpdate

    -Mouse rotation is the same regardless of FPS
    -Controller rotation is not however. Changing fps from 120 to 60 makes the camera slower, and 30 is much much slower.
    Any way to fix?
     
    Last edited: Aug 8, 2022
  2. gaborkb

    gaborkb

    Unity Technologies

    Joined:
    Nov 7, 2019
    Posts:
    856
    Do you have the issue if you update Cinemachine to 2.8.6? Are you using the Input System package?
     
  3. SealDev

    SealDev

    Joined:
    Feb 13, 2016
    Posts:
    13
    @gaborkb Yes. Issue persists. Using legacy input.

    To reproduce it, set Application.targetFrameRate to 120, 60, and 30 and play with a controller.
     
    Last edited: Aug 8, 2022
  4. Prazo20

    Prazo20

    Joined:
    Jul 9, 2022
    Posts:
    10
    Excuse me am using the Input System Package and its sensitivity is insane i cant even get a clear view without going around my player 2 times please help me
     
  5. Prazo20

    Prazo20

    Joined:
    Jul 9, 2022
    Posts:
    10
    Yh thats true i havent even installed the new version 2.8.6
     
  6. Prazo20

    Prazo20

    Joined:
    Jul 9, 2022
    Posts:
    10
    I'll install it and bring back my latest feedback
     
    gaborkb likes this.
  7. SealDev

    SealDev

    Joined:
    Feb 13, 2016
    Posts:
    13
    @gaborkb As long as you have a controller, you can test using the program DS4Windows directly inside of unity
     
  8. SealDev

    SealDev

    Joined:
    Feb 13, 2016
    Posts:
    13
    Oh interesting! Sensitivity is also affected by changing from fullscreen to windowed in a build. (made much slower)
     
  9. SealDev

    SealDev

    Joined:
    Feb 13, 2016
    Posts:
    13
    Upgraded to CM 2.9.2 because it mentions this:
    "Bugfix: InputValueGain mode of axis input was not framerate-independent"

    Sadly, lowering the framerate still slows down camera rotation speed, on a camera of type POV, Framing Transposer, when using a console controller.

    Worth mentioning this only happens with the controller, not the mouse.
     
    gaborkb likes this.
  10. gaborkb

    gaborkb

    Unity Technologies

    Joined:
    Nov 7, 2019
    Posts:
    856
    The input from those devices is different. Have a look at this forum post on how to set it up correctly to be FPS invariant: https://forum.unity.com/threads/cin...er-depending-on-the-fps.1331880/#post-8437469.
     
    Gregoryl likes this.
  11. SealDev

    SealDev

    Joined:
    Feb 13, 2016
    Posts:
    13
    Is it impossible if I don't want to use the new input system?
     
  12. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,711
    In that case you can intercept the input by installing a handler for
    CnemachineCore.GetInputAxis
    . That handler can apply the inverse deltaTime scale before returning the value.
     
  13. Prazo20

    Prazo20

    Joined:
    Jul 9, 2022
    Posts:
    10
    Wow it actually worked by just updating it Thanks