Search Unity

Cinemachine state-driven camera vs enabling/disabling cameras manually

Discussion in 'Cinemachine' started by Mitroram, Jan 27, 2020.

  1. Mitroram

    Mitroram

    Joined:
    Dec 19, 2019
    Posts:
    1
    Hello everyone,,
    I have a turn-based battle scene where I need to switch between different virtual cameras based on the current phase of battle, e.g. player attack vs enemy attack.
    mobdro.bio/ luckypatcher.tips/ kodi.bio/
    I'm currently assigning cameras to different phases and enabling/disabling them during the phase. However, it sounds like this might be a good candidate for a state-driven camera.

    Is there a benefit to using a state-driven camera vs just enabling and disabling cameras manually in scripts? I'm having trouble figuring out where the actual difference is.
     
    Last edited: Jan 29, 2020
  2. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,725
    The StateDrivenCamera is just a convenient way to map vcams to state machine states, so that you don't have to write code. If you already have the working code, no need to change it.