Search Unity

"OnTransitionFromCamera()" effect, but between a FreeLook and (regular) Virtual Camera?

Discussion in 'Cinemachine' started by andrematui, Feb 15, 2018.

  1. andrematui

    andrematui

    Joined:
    Jul 8, 2015
    Posts:
    5
    Hello!

    I am building a third person game with a lock-on system (Zelda, Dark Souls etc).
    I'm using a FreeLook camera for normal camera controls and a Virtual Camera with a group composer for when an enemy is locked on.
    Working on the transition between these two cameras I'm struggling to find a way to make one camera look at the same place/angle the previous camera was looking when the transition is triggered.
    I've successfully achieved this effect when transitioning between two FreeLooks using the method OnTransitionFromCamera(), but got stuck when trying to set the Virtual Camera's position and rotation by myself.

    I considered changing the lock-on camera to a FreeLook, but then couldn't think of a way to make the FreeLook follow the character's back (achieved with the nomal camera's "lock to target" option in Binding Mode).

    Does anyone how I could make this work?
     
  2. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,728
    You can lock the FreeLook to the character's back (or anywhere, depending on your bias setting) by just removing the axis input names from the Axes in the freeLook. Then the user won't be able to move it.