Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Bug Recenter to target heading in CinemachineFreeLook works in pause(deltatime = 0)

Discussion in 'Cinemachine' started by DeuS, Jan 11, 2023.

  1. DeuS

    DeuS

    Joined:
    Feb 8, 2013
    Posts:
    24
    Version 2.9.4. Unity version 2022.2.1f1 or 2022.1.24f
    When recenter to target heading is enabled, then X axis value is updated in pause, when TimeScale = 0 and deltatime = 0.
    I think, it can be fixed by change class AxisState method DoRecentering
    instead
    Code (CSharp):
    1. if (deltaTime >= 0)
    2.     deltaTime = Time.realtimeSinceStartup - m_LastUpdateTime;
    do
    Code (CSharp):
    1. if (deltaTime > 0)
    2.     deltaTime = Time.realtimeSinceStartup - m_LastUpdateTime;
     
  2. Bladgharm

    Bladgharm

    Joined:
    Jan 22, 2014
    Posts:
    3
  3. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,658
    Thanks for reporting, we'll take a look.