Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Question virtual camera followed TargetGroup not move smoothly

Discussion in 'Cinemachine' started by NoobCoderFake, Jun 9, 2023.

  1. NoobCoderFake

    NoobCoderFake

    Joined:
    Nov 24, 2015
    Posts:
    41
    My vcam followed a TargetGroup, and when I change one target's weight from 0 to 1 with another target's weight from 1 to 0, vcam just move instantly from one to another point, seems like it just ignores the damping value. The effect I need is my cam move from one target smoothly to another. Am I use wrong CinemachineComponent?
    upload_2023-6-9_19-33-20.png
     
  2. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,233
    Changing the weight instantly is equivalent to the tracking target instantly warping to a new position. Given your settings in the vcam, it should not reposition itself instantly, but there should be some easing into the new position. However, if the target position changes very radically, it could appear that the camera jumps initially and then settles in. Is that what's happening? Can you show a video?

    One potential way to address this is to not change the group member weights all at once, but instead to lerp them to their new values, spread out over a few frames. You can do this with a coroutine.
     
  3. NoobCoderFake

    NoobCoderFake

    Joined:
    Nov 24, 2015
    Posts:
    41
    I find out it may cause by the CinemacineConfiner since when I disable the confiner it works fine.
     

    Attached Files:

    Gregoryl likes this.