Search Unity

Weird CineMachine Camera behavior in - TimeLine.

Discussion in 'Cinemachine' started by msl_manni, Jul 24, 2017.

  1. msl_manni

    msl_manni

    Joined:
    Jul 5, 2011
    Posts:
    272
    The issue we are seeing is that when we Pause - TimeLine , instead of Cinemachine keeping the active Virtual Camera it jumps to use a 'random' camera.
    Upon Resume - TimeLine, it jumps back to the TimeLine Camera.

    Which is weird for our project.

    Upon investigation it appears that both OnBehaviourPause and OnGraphStop functions are called when either TimeLine is paued or stopped So CineMachine releases control of the TimeLine Camera. Kindly find a fix for this behaviour.

    The issue was raised in TimeLine forum but the issue is not resolved yet.

    https://forum.unity3d.com/threads/p...sing-timeline-breaks-cinemachinemixer.484168/
     
  2. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,728
    Yes this is a Timeline issue. When they fix that then this problem will go away.
     
  3. msl_manni

    msl_manni

    Joined:
    Jul 5, 2011
    Posts:
    272
    So have you asked TimeLine team to deal with the issue? And any Idea when it will be corrected.
     
  4. TomClifton_Prosper

    TomClifton_Prosper

    Joined:
    Mar 31, 2017
    Posts:
    2
    I am also seeing this issue in Unity 2017.1.0p4.

    This issue is a massive deal breaker for us as it means we are unable to pause our timeline. Is there an ETA on when this issue will be resolved?!
     
  5. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,728
    A couple of things.
    1. The little "play/pause" button on the timeline window (activated when you press the spacebar) is not actually a pause button, it's a stop button. That's why the Cinemachine tracks release control.
    2. I'd be very surprised if there wasn't a programmatic way to pause the timeline. Ask on the timeline forum for the right API call.
    3. Have you tried setting the timescale to zero to pause the clip?
     
  6. TomClifton_Prosper

    TomClifton_Prosper

    Joined:
    Mar 31, 2017
    Posts:
    2
    Hi Gregory,

    Just to clarify I am calling PlayableDirector.Pause() to pause the timeline. This results in the same behaviour as described above and the camera reverts to the same position it was in before the timeline started running. I would expect the camera to hold on the last playing animation.
     
  7. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,728
    ok, thanks for the clarification. What about setting the timescale to 0 to pause?
     
  8. seant_unity

    seant_unity

    Unity Technologies

    Joined:
    Aug 25, 2015
    Posts:
    1,516
    The Pause() behaviour on PlayableDirector makes the timeline stop but keeps it in a state where is can be resumed from where it was.

    The behaviour that is more appropriate in this case would be a 'hold', where Timeline continues to evaluate, but time does not advance. You can accomplish that by

    Code (CSharp):
    1. GetComponent<PlayableDirector>().playableGraph.GetRootPlayable(0).SetSpeed(0);
    Then to resume playback

    Code (CSharp):
    1. GetComponent<PlayableDirector>().playableGraph.GetRootPlayable(0).SetSpeed(1);
     
    Firemaw likes this.