Search Unity

Linking Idle Animation to end of Walking Animation Using Blend Trees,Idle Animation Depending on Wal

Discussion in 'Animation' started by unity_diFlgd9O2Uyj8A, Apr 7, 2019.

  1. unity_diFlgd9O2Uyj8A

    unity_diFlgd9O2Uyj8A

    Joined:
    Apr 7, 2019
    Posts:
    1
    Currently, I have a blend tree with four directions (North, South, East, West) and a Blend Tree with four idle animations that correspond to those four directions.
    My current problem is that I can't figure out how to set up the two blend trees so, for example, when the "walking-animation-east" is done playing due to the player ceasing movement, that the "idle-animation-east" is played. Can someone explain to me how I would go about linking the two blend trees so this functionality is properly implemented?
    If any further details are needed (like my implementation of movement code or the structure of the Blend Trees) please let me know!
    Thank you so much for your time, and thank you in advance for your advice!
     
  2. Kybernetik

    Kybernetik

    Joined:
    Jan 3, 2013
    Posts:
    2,570
    Instead of just using a "movement" parameter that goes to 0 when you stop moving, use a "facing" parameter to control both blend trees and an "is moving" bool to control the transitions between them. That way when you stop moving the idle tree will still have access to the "facing" direction.