Search Unity

Play animation relative to current node position?

Discussion in 'Animation' started by hexdump, Mar 12, 2014.

  1. hexdump

    hexdump

    Joined:
    Dec 29, 2008
    Posts:
    443
    Hi,

    I have setup a 2d character based on sprites. The character has a gun and follows the mouse cursor with head and arms. I have done this using 2 different keyframes (from 0 degrees to 90 degrees aim range) and setting animation time manually. This is how I interpolate the pose and get the correct angle to the mouse cursor. Now I need to add a shot animation where the arms, etc... shake a bit to fake the back power of the shot. Is there any way to play this animation relative to the current pose of the character? I mean if arms are at 45 degrees they will move relative to its world transformation (arm will move backwards through x negative axis direction).

    Could anybody point me in the right direction?

    Thanks in advance.
     
    Last edited: Mar 12, 2014