Flip sprite without node.scale.x = -1

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?

Thanks!

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.

Hi Pedro,
What you say makes sense.
Thank you!

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.