Search Unity

How to Combine 2 Animations?

Discussion in '2D' started by Dolamyte, Jul 29, 2014.

  1. Dolamyte

    Dolamyte

    Joined:
    Jul 29, 2014
    Posts:
    2
    Hi Guys,

    Noob here. I make this 2D character using a paper cutout method. I was wondering if I can combine 2 animation objects together and and be able to turn it on and off. For example, I made this "raise" animation to the hand of my character and I want to combine it only with my jumping animation and not with my idle animation. How do I do that?

    Thanks
     
  2. cbothra

    cbothra

    Joined:
    Mar 14, 2014
    Posts:
    125
    Hey, you can add conditions in the transition in Animator if you want to play the same with your jumping animation. So that the animation gets played only when the condition is true.
     
  3. Dolamyte

    Dolamyte

    Joined:
    Jul 29, 2014
    Posts:
    2
    Hey cbothra, Thanks for the reply,

    The raise hand animation doesn't want to play for some reason. Here I attached some screen shot. Hopefully its easier to understand my question.
    This is my jumping animation, where i just animate the y coordinate on the character game object.

    Screenshot 2014-07-29 11.25.37.png

    And this is my arm raise animation, where I animate the left arm locally. my goal is to attached this animation only when the jumping animation is play.


    Screenshot 2014-07-29 11.25.58.png
    and this is my animator window
    Screenshot 2014-07-29 11.34.16.png

    Thanks again for your help!
     
  4. cbothra

    cbothra

    Joined:
    Mar 14, 2014
    Posts:
    125
    In the Animator window you need to Set its transition form Jump State only if you want it to trigger while the player is in jump state.