Switching between Cinemachine and TPC camera

wizard

New member
Could you please share best practices on how to switch between Cinemachine timelines and TPC camera?
From what I was able to discover so far it requires to disable the Timeline object (see the attached screenshot). Otherwise, Cinemachine cameras override the main camera view.
The goal is creating of dynamic switching between the main game process and various cut-scenes.
 

Attachments

  • 2020-05-02_22-00-50.png
    2020-05-02_22-00-50.png
    28.1 KB · Views: 5
I am not too familiar with Cinemachine but does disabling the timeline object work? If it does then I'd go with that :)
 
I've noticed that disabling the timeline simply stops it, however, it doesn't return the proper camera view - I use Third Person Combat.
Meanwhile, disabling the CinemachineBrain works so I enable or disable it via scripting.
It looks like a workaround though.
Also, I'm not sure if I need to switch View Type (see screenshot).
Please clarify.
 

Attachments

  • 2020-05-03_15-31-34.png
    2020-05-03_15-31-34.png
    9.2 KB · Views: 2
Switching the view type should restore the proper view. This page has an example for how to switch:

 
Thanks. I've tried it. However, switching the view type via Inspector or script doesn't help. Please check the video attached.
The horizontal rotation control is inverted and the vertical one is jumping, meanwhile, the camera is following the character.

The only solution that restores the proper functioning for me so far is disabling the Cinemachine brain:
C#:
m_Brain = m_CameraController.GetComponent<CinemachineBrain>();
m_Brain.enabled = false;
 
Disabling the brain makes sense - I'll add it to the Cinemachine ViewType.
 
So was it a bug? Just wondering why the camera behaves badly, was thinking that I probably missed something
 
It has been awhile since I last used Cinemachine but I'll take a closer look at it and let you know after I do. Since it's working for you when switching View Types I suspect that it was.
 
Thanks. However, I don't switch View Types just disable/enable the Cinemachine brain.
It looks like switching Views Types doesn't work.
 
I improved the Cinemachine ViewType so it works better when switching from another ViewType. Go ahead and get the integration again.
 
The issue is still here.
I installed the cinemachine package from this page once again:
Then disabled this line code
Code:
//m_Brain.enabled = false;
The active View Type is Third Person Combat.
 
You don't want to disable the brain - this is what allowed me to switch view types. You aren't using the free look virtual camera, are you? I likely need to update the integration to support the virtual camera type that you are using.
 
I added two cameras (virtual and free look) that trigger upon entering various areas (cut scenes). However, the issue (see the video above) appears once the game is started and no cut scenes are being played yet, and the view type is set to Third Person Combat. So disabling the Cinemachine brains is only helps.
 
So disabling the Cinemachine brains is only helps.
I think that we are talking about the same thing. When the Cinemachine View Type is not activated the Brain should be disabled. This is done within Cinemachine.ChangeViewTypes:

Code:
        public override void ChangeViewType(bool activate, float pitch, float yaw, Quaternion characterRotation)
        {
            m_Brain.enabled = activate;

This will allow your game to start with the third person camera and have the brain disabled.
 
Top