Search Unity

Creating a Virtual Camera Messes the Position of the Main Camera

Discussion in 'Cinemachine' started by xCyborg, Sep 14, 2020.

  1. xCyborg

    xCyborg

    Joined:
    Oct 4, 2010
    Posts:
    633
    So usually when I (or anybody) decide to add in a virtual camera, we already have the default main camera kinda roughly positioned to the desired spot, but when adding the VC, it throws that outta the window and places it at the scene view perspective.
    This is very annoying, I couldn't find a setting to change that.

    Some questions:
    - Why isn't the default behavior positioning the VC to the camera's position?
    - Why when adding Cinemachine components manually (Brain to camera and VC to a GO) it fails to follow the target?

    And for more design oriented questions:
    - Why can't we add the virtual camera directly from the Camera component without all that hassle?
    - Why can't we have all the cinemachine components merged into one universal component and attached to the camera object directly?

    Thanks.
     
    Last edited: Sep 14, 2020
  2. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,711
    These are good questions and suggestions, thanks for posting.

    The default behaviour is to follow the scene view, because it has a navigation interface that many people find easy to use. Set up your shot in the scene view, then create a vcam to lock it in. It's the simplest workflow. If instead you want to position a camera and then grab the settings from that, then it's one extra step, assuming the the new vcam isn't live (and is therefore not controlling the Camera):

    upload_2020-9-14_18-15-47.png

    It will follow the target if you assign one...

    upload_2020-9-14_18-18-2.png

    ...and set the procedural algorithms (Body and Aim) for follow and lookat (e.g. Transposer and Composer). The virtual camera is a versatile tool that can do many things, depending on how you set it up. That's why there is a Cinemachine menu to help create some commonly used things. By default, when you just add the component, you will get a passive vcam (i.e. one that has no procedural behaviour) which will stay where you put it.

    That's a good idea, and we are in fact looking at evolving the Unity Camera in that direction. It isn't a small job, as we have to be careful not to break existing projects.

    Again, historical reasons get in the way and make this difficult. However, it does make sense and our intention is to make future versions of Cinemachine more in line with this idea.
     
    gaborkb likes this.
  3. xCyborg

    xCyborg

    Joined:
    Oct 4, 2010
    Posts:
    633
    Thanks for the reply,
    As in all the scenarios I use Cinemachine, first thing it does is it automatically locks the camera into position which makes this `Adopt Current Camera Settings` option useless.
    We are used to Alt Shift F shortcut to align the camera to scene view, so maybe the other way around makes more sense with Alt Shift F to align to scene view.
    Being able to manipulate and align cam position freely in scene view perspective is one of the features I miss in CM.
     
  4. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,711
    Here is one way you can work, which might make things more comfortable for you.

    First thing, make a passive CM vcam and give it higher than default priority. That becomes a proxy for your main camera. When you want to move the main camera, move this object instead and the main camera will track it exactly.

    From now on, when you create new vcams, they will be at the default (lower) priority and so will not control the camera. You can then use the "Adopt Current Camera Settings" feature.
     
  5. xCyborg

    xCyborg

    Joined:
    Oct 4, 2010
    Posts:
    633
    Also can I suggest moving the Cimemachine create menu into the GameObject/Camera menu, it would make alot of sense and keep the editor tidy and CM less intrusive.

    upload_2020-9-15_1-42-49.png

    Thanks
     
  6. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,711
    Yes! It is already on our todo list :)
     
  7. xCyborg

    xCyborg

    Joined:
    Oct 4, 2010
    Posts:
    633
    It's a workaround I guess, or I could use Transform Copy/Paste Component values but thanks for the tip.