Search Unity

Question Recenter target using framing transposer

Discussion in 'Cinemachine' started by DakaloDev, Aug 4, 2023.

  1. DakaloDev

    DakaloDev

    Joined:
    Jul 18, 2023
    Posts:
    2
    upload_2023-8-4_12-42-38.png

    Is there a way to smoothly recenter the target by code?
    What I need is that after X seconds of the player not moving the camera smoothly recenter the player, so far I cannot find the proper way to do it.
     
  2. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,711
    Perhaps the simplest way is to have a script lerp the vcam's dead zone size to 0, then restore it after it's done.
     
  3. DakaloDev

    DakaloDev

    Joined:
    Jul 18, 2023
    Posts:
    2
    It is definitely a solution, feels hacky but works.