Search Unity

How to blend with the same vcam? For example when changing transposer m_offset

Discussion in 'Cinemachine' started by carlosdubus, Jan 11, 2020.

  1. carlosdubus

    carlosdubus

    Joined:
    Jan 3, 2015
    Posts:
    2
    I am changing a vcam transposer the following way, but it teletransports to the new offset. Is there any way to blend to the new offset, or do I need to this manually using Lerp or similar? I could set a vcam for each offset requirement but I don't know how many different offsets I will need in the future, or if it will have other things changing besides the offset. I would rather set the different parameters in code and blend to the new settings.

    I could maybe clone the vcam, set the new offset on the clone and try to blend to the cloned vcam. I'm wondering if there is an easy way.

    Thanks!

    Code (CSharp):
    1. var transposer = vcam.GetCinemachineComponent<CinemachineTransposer>();
    2. transposer.m_FollowOffset = newOffset;
     
  2. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,728
    Keep it simple: lerp it with a coroutine
     
  3. carlosdubus

    carlosdubus

    Joined:
    Jan 3, 2015
    Posts:
    2
    Yeah. That's what I thought. Thanks for the quick response!