Root Motion Rotates mesh On Slopes

Pretty much what is said in the title…

I don’t know if it’s normal or not, but I have an attack animation played by my AI, and if she plays it on a slope ( I think it sometimes happens even without said slope ) she will end up with a rotated root bone I think. Is there a way to prevent it?

Here is a picture of what is Happening:

Here he had time to turn around and start going back before I took the picture, but the normal of the floor seems to determine the angle of the rotation. Is it normal?

Welp, it’s gonna become a bad habit, but I sorta solved the problem…

I keep zeroing the local x and y axis in my tick function.

Tadaaaaa!