Ai won´t move backwards to specified Distance

Hello everyone,
I want to create a simple combat system. Currently, I have a StateTree, an AI controller, and the AnimBP from Starter Content.
My plan is for the enemy to run toward the player, attack, and then walk backwards to a certain distance. The attack works, but it’s a root motion montage, so the enemy keeps getting closer every attack, and I need your help how i can manage the enemy to walk backwards so he is everytime facing the player.
What do I need to do to make it work?

thanks in advance

You can use SetFocus on the AI Controller of the enemy
Then if the enemy is a Character, in the Movement Component you should set Use Controller Desired Rotation and disable Orient Rotation to Movement
This should make the enemies always face the target that you set as a focus

You can create some state tree tasks for this as well (not sure if they exist out of the box), to Set/Clear Focus, or even enable/disable Orient Rotation to Movement

When Orient Rotation to Movement is enabled, it will take priority over Use Controlled Desired Rotation, and will rotate the character towards the direction of the velocity, using the Rotation Rate defined in the Movement Component

With Focus set and Orient disabled, your enemies will now be able to walk backwards and strafe while locked at your character

If you’re only using Pawns and not Characters, then I think you have to enable Use Controller Yaw in your actor’s details

Many thanks Zeaf,
SetFocus on the AI Controller was what i forgot to set. <3