Search Unity

Help Wanted My player sprite defaults to one animation in the blend tree when the player is not moving

Discussion in 'Animation' started by sovichmarcus, Sep 19, 2021.

  1. sovichmarcus

    sovichmarcus

    Joined:
    Feb 19, 2021
    Posts:
    2
    So, my player sprite currently has four animations in a single blend tree (these animations are for when the player is walking) and when moving, the animations play as they are supposed to, however, when the player is not moving the blend tree defaults to the downward walking animation, mind you I have set it up so that when the player is not moving the animation speed is zero so this animation default is only showing one frame of the animation, however, I want the animation speed to not only pause on the downward walking animation but also the upward, left, and right animations, how can I get that to happen?

    P.S. The blend tree is defaulting to the downward walking animation because that animation is ordered first on the blend tree.
     
  2. Ted_Wikman

    Ted_Wikman

    Unity Technologies

    Joined:
    Oct 7, 2019
    Posts:
    546
    My advice would be to create another blend tree for idle, which is switched to when the movement speed is close to 0. The idle blend tree parameter would then be a "facing direction" parameter. With this you would play the idle animation in the direction you are facing.
     
unityunity