Search Unity

Free look Camera has jerky movement under specific circumstances

Discussion in 'Cinemachine' started by bagle45, Jul 16, 2019.

  1. bagle45

    bagle45

    Joined:
    Jul 25, 2016
    Posts:
    17
    I have an edge case with the Cinemachine Free Look Camera. When the X axis input value returns to zero, it will briefly "Pop" in the direction it was originally rotating in by a noticeable amount, but only if the following conditions are met. If any one of them is not met, the bug will not trigger.
    1) The input is being set externally (i.e. By setting the Input Axis Name to nothing, and driving m_XAxis.m_InputAxisValue)
    2) The Brain's update method is set to "LateUpdate" (It also triggers in "smartUpdate" in our current project, but I'm unable to reproduce this in the demo project I've attached).
    3) The Free look's binding method is set to "World Space".
    4) The Value of the Y Axis is NOT 0.5 (The effect is most obvious as it approaches 0, or 1).
    5) The Frame rate is low (I'm pretty sure the bug triggers regardless of frame rate, but it's almost imperceptible at 60+ fps. I've locked the framerate at 20fps in the demo project to highlight this).

    I've attached a demo project that reliably reproduces the effect. It's setup to work with controller, as it showcases the effect best, but you can still notice it with mouse input.
     

    Attached Files:

  2. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,724
    Yes I see the problem. Thanks for the upload. Stay tuned.
     
  3. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,724
    We've identified and fixed the bug. The fix will be available in the next CM release. Thank you very much for reporting this!
     
  4. bagle45

    bagle45

    Joined:
    Jul 25, 2016
    Posts:
    17
    Oh that's fantastic! Thank you so much for taking care of that so quickly Gregoryl, really appreciate it!
     
    Gregoryl likes this.