Search Unity

Creating an Oblivion Style NPC Camera Transition

Discussion in 'Cinemachine' started by FantasticDamage, Dec 5, 2019.

  1. FantasticDamage

    FantasticDamage

    Joined:
    May 14, 2017
    Posts:
    18
    Hello,

    I am making a first person adventure game and was wondering how I could start making a camera transition similar to the one found in Elder Scrolls Oblivion when the player starts a conversation with an NPC.



    From what I observe 3 things happen

    1. The player’s camera rotates and locks in place to be at eyeline with the NPC

    2. The player’s camera zooms in towards the NPC's face

    3. The NPC rotates to face the player.

    Right now, I am only concerned with getting step 1 solved. I've scanned through the Cinemachine documentation just to see what it has offer in terms of features, but I have yet to try it out. Would Cinemachine be a good approach to doing something like this?
     
  2. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,730
    Can you post the media again? It seems to be broken.

    Just from your verbal description, I'm guessing that a CM blend between the player cam and the lock-to-eyeline-NPC cam would work, if you give it a cylindrical blend hint.
     
  3. FantasticDamage

    FantasticDamage

    Joined:
    May 14, 2017
    Posts:
    18
    Yeah sure. I re-embedded the media in the first post but if that is still broken, here is the direct gfycat link.
     
  4. Adam_Myhill

    Adam_Myhill

    Joined:
    Dec 22, 2016
    Posts:
    342
    A few ways to do that.

    You could make a player-relative camera which looks at and follows people, using a standard vcam with Composer in the Aim slot and Orbital Transposer in the Body slot. Tune that camera to look how you want for their closeup shot.

    Then, whenever you wish to blend to that angle, simply turn that camera on or raise its priority.

    The blending between vcams is set to 2 seconds as a default - on the Cinemachine Brain on the Main Camera. You can change that to whatever you want or create custom blends between any two cameras, etc.

    Should be really easy, let us know how it goes.