+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
    $body. scale.x = -0.5
if Input. is_action_pressed("move_right") :
    vel.x += speed
    $body. scale.x = 0.5
in Engine 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,939 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 Frequently asked questions and 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 [email protected] with your username.