Search Unity

Resolved Animation not playing even though transition occured

Discussion in 'Animation' started by SassyPantsy, Feb 2, 2021.

  1. SassyPantsy

    SassyPantsy

    Joined:
    May 17, 2020
    Posts:
    142
    Weird issue here. I'm setting up an animator controller. It has two states - Idle and Running, to each it's own different animation. When the transition occurs, the animation doesn't change. I've switched the animations between the states themselves, and got the same result: whatever's the animation in "Idle", it will play, even when the transition occurs to the "Running" animation - which I see in the animator window.

    Currently it's set on a speed parameter, basically if speed is greater than zero transition to run, if it's lower than 0.1 transition to Idle. again, this works. I see the parameter's value change in the inspector, I see the state's transition, but nothing plays besides the "Idle" animation. I have no idea why.
     
  2. SassyPantsy

    SassyPantsy

    Joined:
    May 17, 2020
    Posts:
    142
    I've solved it... Turns out there were 2 issues:
    1. There were 2 animators on the prefab, one on the parent game object and one on the player model, that is why only the Idle animation was playing.
    2. The controller on the parent object wasn't connected to any avatar, while the one on the character model was. When I removed the one on the model, my player went back to T-pose. I've connected the right avatar to the character controller (the avatar is an object in the game files, not in the hierarchy or prefab) and now it works.

    Gonna keep this post up because nothing online talks about avatar setup (I guess it happens automatically most of the time), and it's worth mentioning, and also because it took me above an hour to reach this solution, because I couldn't find anything online.
     
  3. lolgube010

    lolgube010

    Joined:
    Jun 22, 2020
    Posts:
    1
    this helped us. thanks :)