Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | Bushies |
So, my problem is that I could flip my animation already, however I can’t make it work as when it got flipped the animation won’t work( to go to the other direction). anybody knows how to make it flip and play the animation. Thanks
here’s my code :
if Input. is_action_pressed("move_left") :
vel.x -= speed
$AnimationPlayer.play("Run")
$body. scale.x = -0.5
if Input. is_action_pressed("move_right") :
vel.x += speed
$AnimationPlayer.play("Run")
$body. scale.x = 0.5