Character Animation Blended Tree Question

I watched the recent live training on 2D character controllers. This is a great presentation.

I followed some of what was given in this training for my own 2D controller. Basically I have a player character that has 4 different states. It is represented by 4 sprites. One for horizontal movement, one for vertical, one for diagonal upper right / lower left and one for upper left / lower right.

My Animator has 2 parameters: vSpeed and hSpeed.

I created a single blended tree. The blended tree is a 2D simple directional. I have it set up so that based on the combination of the vSpeed and hSpeed it will show the correct sprite mentioned above.

This works great with a single problem. When the user lets off of the controller so that the speeds both go to 0 I want the sprite that was last showing to remain.

Currently what happens is the horizontal sprite always shows when both speeds are 0. Not sure why.

Here is my table in the blended tree:

I figured it out. I can’t believe I didn’t see this as a solution. I guess I was so focused on doing things “correctly”. I say that because my solution is sort of to fool the system.

All I ended up doing was only updating the vSpeed and hSpeed if either one was not zero. If they are both zero I don’t update the parameters. I think you can see why this feels “wrong”. Basically I leave the values as being non-zero, which causes the last pose to remain even though the values really are NOT non-zero.

This works, however, because it leaves the pose to the last moving pose and this is just what I wanted.

This just shows sometimes your have to think outside the box and warp reality a little to get the result you want.