Search Unity

Question Group Framing Mode -> Min Ortho Size randomly disappears when using Timeline

Discussion in 'Cinemachine' started by Jamez0r, Sep 30, 2020.

  1. Jamez0r

    Jamez0r

    Joined:
    Jul 29, 2019
    Posts:
    205
    I'm using a VCAM as a "cutscene camera" for my 2D project. The cutscene VCAM gets enabled when the Timeline for the cutscene starts. The VCAM uses uses a TargetGroup aimed at a GameObject, whose position is animated in the timeline. This works fine.

    I also need to be able to zoom in/out during the cutscene, so I am using an Animation Track on the VCAM to animate the Minimum Ortho Size to zoom. This also is fine most of the time.

    The problem is that the VCAM randomly seems to switch some sort of mode, which causes the Group Framing Mode section of the VCAM to disappear. This means the Minimum Ortho Size option is now gone, I can't animate it in Timeline, scrubbing no longer previews the zoom, etc.

    What would cause the Group Framing Mode to disappear? Maybe its from something happening while I am running the game, and it isn't getting reset? It seems to happen randomly, but only if I run the game and trigger the cutscene.

    Here you can see that that the Group Framing Mode is normally visible, and that I can animate it in Timeline:




    Then here it randomly is gone:



    I'm assuming its something I'm doing while the game is running, but I don't understand what it is.

    Also, if I reload the scene, the Group Framing Mode comes back.

    Would really appreciate some help on whats going on, and if/how I can prevent it from happening or at least understand why it is happening :)

    Thanks!!
     
  2. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,711
    The group framing mode would disappear if the Framing Transposer does not recognize the target as a group. Is it possible that some script is disabling the target group behaviour in the target?
     
  3. Jamez0r

    Jamez0r

    Joined:
    Jul 29, 2019
    Posts:
    205
    Hey Greg! Thanks for the response/info!

    I went for a while without this issue happening, but it just happened again so I took a quick video showing the VCAM and the target (with Target Group).

    https://i.imgur.com/FTS6MmS.mp4

    Again, when I reload the scene it sets everything back to normal. Might I be overlooking something? I'm assuming its something related to Timeline. I don't think I even entered Playmode this time.
     
  4. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,711
    That's really weird. I can't think of anything offhand that would make it happen.
    Does it still happen if you enable the virtual camera behaviour?
    Does it still happen if you change the vcam's update mode to Always?
     
  5. Miguel_FirstLight

    Miguel_FirstLight

    Joined:
    Apr 9, 2020
    Posts:
    19
    I got the same issue.
    Enabling/Disabling doesn't seem to solve the issue. Also changing the update mode doesn't make the inspector show the Target group info.

    I'm using Cinemachine 2.6.3 with Unity 2020.1.5f
     
  6. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,711
    If anyone can throw together a small project that shows this issue, then we can take a look. As it is, we can't repro.
     
  7. Jamez0r

    Jamez0r

    Joined:
    Jul 29, 2019
    Posts:
    205
    Yeah sorry, it happens rarely and randomly so if I can figure out how to make it happen I'll definitely post a repro!
     
  8. felbj694

    felbj694

    Joined:
    Oct 23, 2016
    Posts:
    35
    It happens for me each time i change a script.
    The Group Framing Mode comes back after i press play and stop once. (When in play mode the group framing is not working)
    Unity 2020.3.0f1 & Cinemachine 2.6.4.

    I created a new empty project but I was not able to reproduce the exact same issue I have.
    The Group Framing Mode still disappears after a recompile, but when i press play it comes back immediately (as oppose to after i press stop in my original project)

    This is my first time posting a project so a bit unsure if I included everything, I used the ReproProjectWizard to minimize the size.

    Just change something in the TestScript to force a recompile and the Group Framing Mode should disappear.

    Is is also possible to fix by resetting the follow target, or reselect Framing Transposer as the Body
     

    Attached Files:

    Last edited: May 10, 2021
  9. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,711
    @felibj694 Thanks for that! I can repro with your project. We'll get a fix in for it.