Sprite Flip Horizontally

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By khai86

hye i am potatoe with programing, like ultra potatoe,
i have been using this demo to start my project, and i wanted the sprite to flip,
and someone told me to read here, as a potatoe i dont understand or how could i add the code to current demo project that im using, could someone help me? on which part should i edit to make my sprite flip horizontally?

:bust_in_silhouette: Reply From: lewis glasgow

to flip a sprite just inver the scale on the x axis (assuming its in 2d)

$Sprite.scale.x = -1