I made a line2d as a player texture and i wanna flip it when the player left or right but there is no flip_h in the line2d class so how do i do it
Use 2D shader to flip the image?
ponponyaya | 2022-03-12 09:22
you can rotate your Line2D by 180 degrees when pressing left
line2d.rotation_degrees = 180
and rotate it back to 0 when pressing right
line2d.rotation_degrees = 0
I meant flipping the texture not rotating it
trien | 2022-03-15 18:03
You can flip the Line2D horizontally by setting its scale.x property to -1. If you also want to flip other related elements at the same time, you can parent them all to a common Node2D and set its scale.x to -1 instead.
Line2D
scale.x
Node2D
Thx it worked
trien | 2022-03-12 15:54