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 Dolly Track Evaluate Orientation is incorrect if track is rotated (CM 2.9.5)

Discussion in 'Cinemachine' started by alec100_94, May 2, 2023.

  1. alec100_94

    alec100_94

    Joined:
    Jan 9, 2017
    Posts:
    26
    Hi there this is something I came across when trying to upgrade my project to Cinemachine 3.0 to do some experiementing (while continuing to use older components so nothing breaks).

    In our game we have a cut-scene that works using a tracked dolly along a smooth path. After upgrading the Cinemachine version the camera was facing the wrong direction on start, the Dolly Track object (With the CinemachineSmoothPath) component is rotated 240 degrees, the virtual camera is set to follow the "Path" as camera up. In Cinemachine 2.9.4 the camera looks forward along the path, but in Cinemachine 2.9.5 (and CM 3.0) the camera is looking in the opposite direction (effectively breaking our cut-scene).

    I done some investigation into this and landed on the EvaluateOrientation method in CinemachineSmoothPath and CinemachinePathBase. This has been changed to use a EvaluateLocalOrientation in CinemachineSmoothPath which is invoked in the base class (CinemachinePathBase).

    I was able to work around my problem with the attached reflection script to re-introduce the old implementation of the EvaluateOrientation method to extend the CinemachineSmoothPath script. There is a regression in the behaviour here.
     

    Attached Files:

  2. antoinecharton

    antoinecharton

    Unity Technologies

    Joined:
    Jul 22, 2020
    Posts:
    189
    Heyyo :)

    Yes looks like a regression happened in 2.9.5 ...

    Did you update your camera in CM 3 (Learn more button)? CinemachineSmoothPath is a legacy component in 3.0. Meaning it's there for upgrade purposes. Dolly cart uses spline package in CM 3.

    Let us know for CM 3. Will come back at you for 2.9.5.
     
  3. alec100_94

    alec100_94

    Joined:
    Jan 9, 2017
    Posts:
    26
    That makes sense, thanks. I'll continue with my reflection script for now as a workaround. I have not upgraded any of my components for now as I want this part of the game to continue working as is while I do some prototying with the new Cinemachine 3.0 systems (effectively rebuilding from the ground up).

    It seemed to be a little more than a single click upgrade, so I'm effectively relying on having a version that supports both right now. From what I can see the Obsolete Legacy components in 3.0 are taken from 2.9.5 and persumably won't be removed immeditely.
     
  4. antoinecharton

    antoinecharton

    Unity Technologies

    Joined:
    Jul 22, 2020
    Posts:
    189
    Hagen likes this.
  5. Hagen

    Hagen

    Joined:
    Aug 16, 2014
    Posts:
    35
    Thaks for geting it in 2.9.7, I just updated from Unity 2021 and all my smooth paths were broken.