- Home /
2D Attack animation while turning
Hello, (2D) I've implemented an attack animation recently, but since the animation was being flipped when,if, the player attacked and quickly switched direction, I made the animation go back to Idle when turning while attacking. But, if you turn really quick, the animation doesn't play long enough. I mean, it quickly shuts down. So I've tried to make a sort of a "key frame" for the attack animation(the main frame of the animation), triggering it when turning, also later on I put it on a coroutine to wait for a couple of frames, but none of the above really worked. Triggering the key frame animation didnt prevent it from flipping while the animation is playing, if you turn quickly. Is there a way to prevent the animation from flipping? I implemented a timer that prevents the character from flipping for a short time when attacking, but it feels weird sort of moonwalking for like 3 frames.. I will use it if I won't be able to fix this tho.
Thank you !