Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Animator with two layers not working

Discussion in 'Animation' started by LeFuji, Apr 13, 2021.

  1. LeFuji

    LeFuji

    Joined:
    Oct 2, 2018
    Posts:
    18
    Hello everyone!

    I'm working on a top down shooter quick project. Essentially, the player have two animation layers:
    One from above the hip, where shooting and reloading animation takes place:
    upload_2021-4-13_16-40-4.png

    And one for everything related to the legs, being idling, walking, running or strafing:
    upload_2021-4-13_16-40-46.png

    I was trying to add two layers, both sharing the same parameters, but handling different animations.

    But One of the does not appear on my game scene. The lower layer always shown up, while the layer above is kind of invisible on the game scene:

    upload_2021-4-13_16-43-24.png
    The picture shows that the sprites on the feet does not appear, even though they are being handled by the animator. If I switch Feet and Base Layer positions, only my feet shows up, animated as expected.

    I've checked both layers to set their weight to 1 (And wrote
    myAnimator.SetLayerWeight(0, 1);
    in the start of my code for both layers.

    Am I missing something here? Any ideas is really appreciated!

    Cheers!