Search Unity

  1. Improved Prefab workflow (includes Nested Prefabs!), 2D isometric Tilemap and more! Get the 2018.3 Beta now.
    Dismiss Notice
  2. The Unity Pro & Visual Studio Professional Bundle gives you the tools you need to develop faster & collaborate more efficiently. Learn more.
    Dismiss Notice
  3. Improve your Unity skills with a certified instructor in a private, interactive classroom. Watch the overview now.
    Dismiss Notice
  4. Want to see the most recent patch releases? Take a peek at the patch release page.
    Dismiss Notice

need help!

Discussion in 'Cinemachine' started by michaeltoan, Jul 5, 2018.

  1. michaeltoan

    michaeltoan

    Joined:
    May 22, 2018
    Posts:
    2
    hi
    we are trying to re implement our old camera system in cinemachine. it was like:
    1 gameobject controlled by a camera path.
    It has a child go, which is the crane controlled by WASD.
    the crane go then has another child GO that controls the actual camera, which we used an asset to control. asset is called camera controller by ottii.

    how should we approach to this with cinemachine or should we port our existimg stuff as an external vcam? however we still want to do lots of transition and every camera needs to be this way. every external vcam we need to have a unique pos. in this case we need 3 gameobjects+ 1vcam for every cameraman which is not really nice...

    based on my underatanding camerastate can only take in 2 values. 1 is saved for extension which we want to save for collider detection. so we have no idea how to jam 3 transform factors into rawpos(we are thinking of outputing one rawpos based on 3 transform calculation but not sure what is the best way to implement code)
    pls shed some lights!
     
  2. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    1,532
    I'm not sure I 100% get what you're trying to do, but from what I do understand it looks like you have an easy way to get what you want.

    First, understand the Cinemachine paradigm: there is one single Unity Camera in your scene, at the root, with a CinemachineBrain component. And there are multiple Virtual Cameras, as many as you like, that when active will control the actual Camera. You can have one vcam per camera rig, and activate/deactivate them to blend.

    So, here is what you do:
    1. Create a Main Camera in your scene, with a CinemachineBrain component on it.
    2. Take your existing camera setup exactly as-is, and in each rig replace the Unity Camera component with a CinemachineVirtualCamera component (if your code won't let you actually delete the Camera component, just disable it). In the vcam, make sure to set the Body and Aim methods to Do Nothing. This will allow your existing scripts to completely control the transform of the vcam. Now you have a custom vcam that does exactly what your existing camera rig does.
    3. When you activate a new vcam rig and deactivate the old one, Cinemachine will blend the Camera between them
    That said, there is an alternative way, which is to discard your existing camera code and re-implement it in Cinemachine, with Dolly Tracks, etc. We can explore that, but I would need a better understanding of exactly what you want.