Sorry I meant the player character, not an enemy. As long as I was not pressing "right" he was always running automatically to the left, like the left arrow key got stuck. Was playing with keyboard on windows.