The animation blueprint in my character mesh starts walking PROBLEM.

Hello, I new here in the forum. I’ve encountered a problem after setting my animation blueprint.
I assigned an animation blueprint to the mesh of my char, but the thing is that it starts walking (to the left) in the viewport (and the when I play the game instead of playing the idle animation it walks, in the place, as in the viewport).

The animation blueprint is okay because I’ve already checked in the preview section in persona animation graph, plus there is no problem in the event graph nor the anim graph as far as I can see.
Moreover when I start the game, when I’m standing still it walks (which I’ve mentioned already) but when I start running the animation plays just well until I stop moving again. It’s really strange.

I deleted the anim blueprint and made it again but the same problem remains.

Thanks you very much.

Edit: I’ve partially solved this by putting the idle anim out of locomotion in the statemachine, but the problem seems to persist because the character have some weird snaps while moving to a stand position or when the char is killed.
Also I’ve checked some things and the problem seems to be, and I’m not really sure for various reasons, the direction variable because when I do not feed the animations with the direccion variable, the problem disappears (of course without direction the animations are not good). I set the direction variable by using ‘Get Actor Rotation’ and ‘Calculate Rotation’ nodes. I get the speed variable setting it with ‘Get Velocity’ and ‘Vector Lenght’ nodes.