Search Unity

2D Animator: how to get rid the animation "blending"

Discussion in 'Animation' started by Bogu-94, Feb 17, 2014.

  1. Bogu-94

    Bogu-94

    Joined:
    Dec 11, 2013
    Posts:
    58
    So I have 3 states for my player. Idle, Walk, and Shoot. It's a 2D mecanim. with the body bone parents the head,arm,and leg bones. and arm parents gun bone.
    --body
    ----head
    ----r_arm
    ------gun
    ----l_arm
    ----r_leg
    ----b_leg

    to make it simple, I only use 3 keyframe, with the 3rd keyframe is equal to the 1st.

    For example:
    in the IDLE state, the "r_arm" rotates the Z
    in the WALK state, it's the same as IDLE, and add the legs rotation
    in the SHOOT state, the "r_arm" translate the X (recoil effect)

    when the player walks, it seems fine cos I use same animation clip for the arm.
    but when it shoots, the arm rotates itself just like idle state, and also get the recoil.
    just how to disable the rotation it gets from IDLE state?

    I use 2 layers in animator. 1 has the transition from idle to walk to idle, and 2 is any state to shoot to empty state.

    thanks before