I wonder if this helps but ...Can't you just flip the parent Node2D.Transform2D directly? (There are even FLIP_X, FLIP_Y constants you may use)
https://docs.godotengine.org/en/stable/classes/class_transform2d.html
If you need another approach independent of using nodes and what Godot offers you, why not take all points from all collision shapes in the enemy, get most extreme values (highest and lowest coordinates) to obtain an overall center point for all shapes, and flip around it?. (Or even getting the sprite center point if that's your reference object).
Hope this helps you find a solution.
Cheers!
last night i figured out one way to achieve it :) the idea was to make an enemy with three different areas (weak spot[head], hurting spot[sides] and killing spot[spikes]), so i just added couple lines of code in func _ready(): and same two lines in _physics(delta):
but your way can be more sufficient probably. thanks, i really appreciate your answer
hello bud, this is super easy... the easy things are normally the most difficult to solve...
just set the scale of the whole node to minus i.e. if the scale is 3 then set self.scale = Vector2(-3, 3)
this will flip the whole node, any movement will also be flipped too i.e. speed = -speed
hope this helps