Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. 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,233
    Thanks for reporting, we'll take a look.