+1 vote

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
in Projects by (13 points)

1 Answer

0 votes

to flip use -1 and 1 not -0.5 and 0.5 i think is problem

by (1,642 points)
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.

Categories