Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct here to familiarize yourself with the rules and how to post constructively.

  2. Unity 2022.1 is now available as the latest Tech release.
    Dismiss Notice
  3. Improve your project's performance with our new guide on profiling in Unity.
    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:
    667
    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
unityunity