Search Unity

Issue playing multiple animation at the same time

Discussion in 'Animation' started by ActullyAaron, Apr 27, 2017.

  1. ActullyAaron

    ActullyAaron

    Joined:
    Apr 27, 2017
    Posts:
    4
    Hello,

    I'm very new to animations in Unity. I currently have my animations done and exported from max. And they're mostly functional.

    My issue is that when I shoot, my arms do a recoil animation but stop doing the running animation so it results in my player model just sliding over the floor. (same for reloading.)

    Looking up tutorials on youtube shows me some old stuff where you have to make a transform variable to add the upperbody to. Then put the animation[shoot].layer = something.

    this gave me some errors (layer stuff didn't work).

    Is there a newer way to do this? Or should I continue looking into this stuff?
    I'm not really sure if the StateMachine can do this for me or if it's all supposed to be in code.


    Thanks in advance,
    Aaron
     
  2. theANMATOR2b

    theANMATOR2b

    Joined:
    Jul 12, 2014
    Posts:
    7,790
    Use an additive layer for the shooting. The lower body will continue to run while the upper body recoils when the weapon is fired.
    Code will be needed to interact with the player controller to tell the controller when the weapon shoots - when to play the recoil animation.