Rotate character in always left Direction using Find look at rotation and Move Component to

I’m creating a combat system. Currently I am trying to create directional attacks, I have all of the functionality setup to decide the direction the attack should be however when it comes to rotating the character towards the enemy it seems like the player will sometimes rotate left and sometimes rotate right. Now this is a problem for the animation I’m using as the character rotates around left. Therefor if rotated right the animation looks buggy. I’m just wondering how I would guarantee the direction the player is rotated.

It’s also important to note, I am using ALS as a base for this project. So perhaps that is messing with the rotation too?

I’m using the “Move component to” node to move the player towards the enemy. The rotation is just a “Find look at rotation” between the player and the enemy.

Hi there,

I’m not an expert by any means, but my guess is with how the rotation value is returned. If it’s a positive rotation, it will turn right, if the calculation gives a negative rotation, it will go left.

Maybe try add a print string to get the yaw rotation being fed to the move component node.

If this is what’s happening, then you simply need to check and correct the value if necessary before it is fed to the node

cheers

I did a print string and that is not the case sadly. It appears to be rotating towards the closest distance. Which I’m not too sure how to make it not do that.