This recipe uses a very similar concept to the Using root motion to steer a character recipe. The only difference is that here we are also using vertical movement and a slightly more complicated Blend Tree. This is a 2D version of a Blend Tree that blends animations using two parameters instead of one. This way we can feed DirectionHor and DirectionVer parameters to it to blend both horizontal and vertical movements.