Search Unity

Triggering separate animations independently on same prefab

Discussion in 'Animation' started by big_stoater, Feb 14, 2020.

  1. big_stoater

    big_stoater

    Joined:
    Jun 25, 2014
    Posts:
    13
    Hey all,

    I've been struggling with this issue for a while now, and I'm hoping someone can help.

    I have a little RV spherical robot that has side doors that swing open and a front panel that opens out of the front.
    These are separate independent animations that I want to be able to trigger from separate key presses.


    The only way I can get it to work is to have the 2nd animation (front panel) triggered when the side panel is in the default closed state, but obviously this is not what I want as I want to be able to trigger this 2nd animation irrespective of the state of the 1st animation.
    See attached image.

    Do I need to use layers to get this to work or do I need separate animation controllers for each animation?

    Thanks in advance!
     

    Attached Files:

    Last edited: Feb 14, 2020
  2. big_stoater

    big_stoater

    Joined:
    Jun 25, 2014
    Posts:
    13
    Got it sussed! I created a new animation layer and put the 2nd animation in there and set the weight to 1.
    I had tried this before but hadn't set the weight!

    Cheers