Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

How to use cinemachine to solve this problem?

Discussion in 'Cinemachine' started by Rohsgolla, Jan 10, 2022.

  1. Rohsgolla

    Rohsgolla

    Joined:
    Apr 21, 2019
    Posts:
    1
    In my project, I already use cinemachine to move around a target object in order to interact with it.
    Now, i need to make a transition that brings the camera up a few meters over the object, and as soon as it reaches the upper part, fades to black, then, without the player being aware of it, moves immediately the camera to a different target while the screen is still black, and then makes the scene reappear again.

    The idea is to simulate a movement towards an upper part of the scene, but actually change the target of the free look to a different game object.

    I tried with a virtual camera, but i have 3 problems:
    - i can't set up the timing of the fade to black while moving up, it starts too early.
    - i don't know how to fade out when im arrived to the new target object, because the transition has already finished before that
    - The worst problem is: if i do the virtual camera thing, the target that is above my object has an orientation, so the virtual camera not only goes up, but ROTATES around the object to align with the target. this is not good, i just want it to go straight up. How can i solve this?

    Is using the virtual camera even right? isnt there a way to just apply a movement to the camera that goes up a bit without setting a specific target?
     

    Attached Files:

  2. gaborkb

    gaborkb

    Unity Technologies

    Joined:
    Nov 7, 2019
    Posts:
    856
    What kind of vcams are you using (Body and Aim components)?

    Depends on what kind of vcams you are using. A lot of the Body components have an offset attribute. You can use that to move the camera up a bit. For example, Transposer - Follow offset.


    You could assign a target that has no orientation.
    Or if you are using Transposer, then you can change the Binding mode to Simple Follow with World up.
    Or you could Framing Transposer, with no Aim component. This way, you can set the vcam's rotation manually to be the same as the one it transitions from.

    You could use CinemachineTrigger volumes to start the fade in/out effects. See our example scenes: Trigger volumes.
     
    Last edited: Jan 10, 2022