when you change the node scale and you are over a static rigidBody (a platformer) fliping sprite with node.scale.x = -1 calls onEndContact -> onBeginContact(), so It’s not a good solution to flip my sprite. Could you recommend some other way to flipx a sprite whitout change the image or the animation?
You could keep your scripts on empty object, and add the sprite as a child… the child has just the sprite, so it should not affect the collision. And you use scale.x on the child only.