Question
For my NPC i flip the scale to change directions.
Any idea to avoid flipping the label?
my current code in the area2d Node look like this
func label_flip()
if get_parent().scale.x > 0:
scale.x = scale.x * -1
elif get_parent().scale.x < 0:
scale.x = scale.x * 1
My Code in the NPC Node
func flip():
facing_right = !facing_right
scale.x = abs(scale.x) * -1
#Change the speed direction
if facing_right:
speed = abs(speed)
else:
speed = abs(speed) * -1