So I'm trying to set up an animation player/tree, it works mostly fine but for some reason when I attack, if I switch the direction I'm moving the attack animation resets and I can keep doing it indefinitely.
the animation tree is set up so that when the Attack animation ends it changes to Idle or Run depending on what condition is active
#Attack animation resets when changing direction
7 messages · Page 1 of 1 (latest)
heh, I had the same problem last night
func animation_start():
velocity = Vector2.ZERO
you can add this func into code, then add it into the animationPlayer to prevent the player character from moving when go into attack state
should you decide to enable the player to move while attacking
func animation_start():
velocity != direction * acceleration
I guess you probably have to implement some kind of var attack = true or false for this to work