Search Unity

Dynamic blend times for Cinemachine transitions

Discussion in 'Cinemachine' started by Destrucity, Jul 28, 2020.

  1. Destrucity

    Destrucity

    Joined:
    Sep 28, 2014
    Posts:
    17
    Is it possible to set up something like a CinemachineBlendDefinition with a Time property that is based on some dynamic value, such as player move speed? Thanks!
     
  2. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,711
    Whatever560 likes this.
  3. Destrucity

    Destrucity

    Joined:
    Sep 28, 2014
    Posts:
    17
    Thank you! This works, but if the player changes speed in the middle of a blend, the transition Time remains based on the player's original speed when the blend was initiated.

    What I would like to try is a transition between two cameras that is based on the player's speed as it fluctuates in real time. Maybe there is a different strategy for this that I am overlooking?
     
  4. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,711
    You can implement a continuous blend with the CinemachineMixingCamera. You'll need custom code to manipulate the blend weights according to your needs.