Search Unity

Transition recalculates when changing previous cam's position

Discussion in 'Cinemachine' started by Garrettec, May 2, 2019.

  1. Garrettec

    Garrettec

    Joined:
    Nov 26, 2012
    Posts:
    98
    Hi, recently we found out that during the transition from vcam A to vcam B, if during transition vcam's A position is changing - the whole transition is recalculating and jerking, is there a way to ignore changes in vcam A positon?

    In our case, we have a "floating platform" prefabs which includes vcam in it, when we need to "move" to the next platform we disable current vcam and enable next one and sink current platform (that is why our previous vcam is moving). Sure, we can unparent vcam, but next time we reuse this platform we will need to calculate correct camera position for this exact platform and we pick it up manually for every different type of platform.

    In short - we can solve it but I prefer to be sure I am not missing already implemented option, so sorry if this stuff is documented somewhere, I've tried to find it but with no result.

    And thanks for the awesome tool, never have an opportunity to express my gratitude to Adam :)
     
  2. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,730
    Yes, the outgoing vcam in a blend continues to update its position. It's not a snapshot. This is by design.

    One possible approach you could take would be to not parent the outgoing vcam to its platform, but instead track the platform in the Body section of the vcam (either use a Transposer with the appropriate offset or a HardLockToTarget if there is a convenient Transform in exactly the right spot). Then, when the vcam is deactivated to launch the blend, also disable its Transposer or HardLockToTarget component. That will turn off the tracking and cause the vcam to stay still as the platform sinks. Then, if you ever re-activate the vcam, just re-enable that component also to resume the tracking.
     
    Garrettec likes this.
  3. Garrettec

    Garrettec

    Joined:
    Nov 26, 2012
    Posts:
    98
    Thank you, @Gregoryl for supper detailed answer and fast reply!
     
    Gregoryl likes this.