Search Unity

CinemachineBrain live camera is top rig instead of free look camera

Discussion in 'Cinemachine' started by JdeHaan, Jan 11, 2022.

  1. JdeHaan

    JdeHaan

    Joined:
    May 19, 2020
    Posts:
    3
    Hello there!

    I'm using the freelook camera for a third-person character view, but I have this issue where the camera object is stuck in a specific position that I cannot change, not even in editor mode. When I look at the cinemachine brain component it says Live Camera: TopRig and on the freelook component, it says that the status is standby instead of live. All the other settings seem to be correct.

    Does anyone have an idea how to fix this?
     

    Attached Files:

  2. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,730
    A FreeLook is composed of 3 separate vcam rigs, which are normally hidden children of the FreeLook. Under some circumstances (e.g. when you manually delete the FreeLook behaviour from an object) it's possible for those hidden rigs to become orphaned and exposed. Perhaps that is what happened to you. Find the orphaned Top/Middle/Bottom rig gameobjects in your hierarchy and delete them.
     
  3. NXTech

    NXTech

    Joined:
    Jul 1, 2018
    Posts:
    6
    Hi Gregoryl,

    I have the very similar problem as the JdeHaan's one, I want try my player system to have a switching between first person & third person camera, but the first is Virtual Camera, and the Third one is using Freelook camera, first time when I switched my third camera to first camera via StateDrivenCamera that's works, but at the second time from first to third that my third (freelook camera) will be stuck at Standby status, somehow I think there's some bugs between the Virtual Camera & Freelook Camera, maybe it messed up with the priority function?

    What I did on the camera switching is just call the animator to play the actual state for StateDrivenCamera with a c# script.

    However, I checked #2 that doesn't have any exposed vcam rigs on my hierarchy, did you know anything about this?

    (these pics is taken from the freelook after stucked on standby status.)

    upload_2022-6-24_18-58-38.png upload_2022-6-24_18-58-55.png upload_2022-6-24_18-59-14.png
     
  4. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,730
    @NXTech We are aware of no priority issues between vcams and FreeLooks (ultimately they are the same thing to the underlying system).

    If you look at the CM Brain inspector when your cameras are stuck in a standby state, what camera does it report as being Live? You can click on the indicator to find the vcam in the hierarchy.
     
  5. NXTech

    NXTech

    Joined:
    Jul 1, 2018
    Posts:
    6
    I got it. My brain's live camera was none when I switched to freelook, but it showed the statedrivencamera when I changed to vcam, later I have searched a topics that you answered about that,

    https://forum.unity.com/threads/cinemachine-brain-no-live-camera.702125/

    I found the bug on my toggle camera script for main camera's culling mask was turned off the default layer when my freelook was activated, so it can't find the freelook object on my brain, it has fixed now, thanks.
     
    Gregoryl likes this.