Search Unity

How to use State-Driven Cameras with Animations in different layers

Discussion in 'Cinemachine' started by danimarti, Sep 4, 2019.

  1. danimarti

    danimarti

    Joined:
    Oct 22, 2016
    Posts:
    14
    Hi everyone!
    I'm using State-Driven Cameras to display different cameras based on animations to bring more diversity to my game, but it looks like this kind of cameras only allow to blend between animations stored in the same Layer.

    Is there any workaround or approach to blend between animations in different layers? I would like to blend between animations in the Attack Layer with Locomotion Layer.

    So far what I thought was creating a camera for each layer, and change the priorities based on the layer the current animation is playing, but probably there is a better way to do it. Any ideas?

    Thanks so much!


    I have animations organized in layers based on the type of action.



    It looks like I only can blend between animations in the same Layer (In the example: Locomotion)
     
  2. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,711
    That's correct, SDC can only blend between animations in the same layer. You'll have to make one SDC per layer, and find some way to blend between them. Bear in mind that multiple layers can be active at once, each of them possibly in a blending state.
     
  3. danimarti

    danimarti

    Joined:
    Oct 22, 2016
    Posts:
    14
    ok, thanks so much :)