I have a container, let’s call it fish. Inside it is the main body sprite and a rectangle for the hitbox of its mouth. Is it possible to flip the container so that when the fish is facing on a different direction then the mouth will be in the correct place?
I think you can use container
scaleX = -1 or
scaleY = -1 for that.
But doing that shifts the physical body of the container outside its visual representation.
Even if I set the body width to negative value, it brings the debug hitbox back, but the collisions still work wrong.
Is there no better way to flip container with all contents?
Otherwise I’d have to resort to flipping everything inside individually, adjusting the offsets and origins, it’s a lot of pain and unnesessary code.