Weird 2d Collider behaviour when flipping (scaling) a 2d Character

Hi everybody,

I’m currently working on a 2d platformer. My player character has a sword in his hand and has different animations for every situation, made in unity (no kind of ‘animated-gif-like-animation’ from a spritesheet. Sorry I don’t know how to describe it better in english…). On this sword there are a Polygon Collider 2D and a Box Collider 2D.

When i flip my character by setting its transforms localScale to negative x value (*-1), those two colliders don’t transform right. For me it seems like it has to do with´the rotation of the arm/sword. I can’t figure out how to correct it. All other colliders (not shown on the screenshot) act correct.

I hope someone can tell me, what I’m doing wrong.

Greetings,
Phil

[18475-scaling+collider.jpg|18475]

This is the most helpful link for this I’ve found so far:

Other possible solutions:

  1. Remove rigid body on child object (this worked for me), rigid body is causing this issue.
  2. Disable collider before changing parent, then re-enable when done.