Search Unity

Animation works - except it doesn't.

Discussion in 'Animation' started by HungryCatGames, Aug 27, 2021.

  1. HungryCatGames

    HungryCatGames

    Joined:
    Jun 24, 2020
    Posts:
    40
    I have two simple animations. Idle and walk. I created the Animator component on my player and added an animation controller to the assets. I've added in the two animations, setup transitions and turned off the "has delay". The transitions are simple. A parameter called "Walk" is bool. One transition is if true, other is if false.

    Added the scripts in my game and press a movement key. If I switch to the animator I can see that the walk animation is active and playing. Switch back to the game and stop moving. Switch back to animator and I can see that the idle animation is active and playing. Except the player never leaves the idle animation.

    Set the walk parameter to true in the animator and now the player is always in walking animation regardless of what the animation player is showing to be active and playing.

    What am I missing? Been through dozens of sites and videos and based on all it SHOULD be working and the animation activity shows that it is but my player object won't switch animations.
     
  2. HungryCatGames

    HungryCatGames

    Joined:
    Jun 24, 2020
    Posts:
    40
    For anyone who comes across this... I solved it. I had an empty containing my object with animations, etc. I had put the animator on the empty instead of one level down on the actual object with the animations. Once I moved the animator to here everything worked as expected.