Top down shooter animation, base off velocity and not input?

I'm in the process of making a top down shooter, where the character is always facing the mouse pointer, and moves around using WASD controls.

I currently am animating based off of input on the horizontal and vertical axes... crossfading the run animation on vertical axis input, and blending strafing animation on horizontal axis input. I'm also using the LookAtMouse script from the unify community so he always faces the mouse cursor.

The problem is, say I move forward and put the mouse cursor to the left of the character, he will turn to face the camera, but the input is still on the vertical axis, so even though he is technically moving sideways, it is only playing the run animation, and not the strafe.

Should I play my animations based off the CharacterController's .velocity.x and .velocity.y, or is that a bad idea? Would it even work? Is there a better solution?

That would work fine. That's what we do here:

Except in our case our animation is frames in a sprite animation.