How to align the Polygon Collider 2D in Unity to match the position of Sprite?
I have a game object. It has a Sprite Renderer with an image. Now I add a Polygon Collider 2D component to the game object, that generates a collider. The shape of the generated collider is correct as expected - i.e. it matches the image from the Sprite Renderer. But the position of the collider is wrong. Here you can see what I mean:
For sure I have a solution - I can manually configure the Offset of the Polygon Collider 2D. But that would take a significant amount of efforts and time (because I have a lot of such game objects, which need to have a sprite and collider). So, I am hoping to find a solution which would position the generated collider correctly. I.e. in such a way, so that the boundaries of the collider would match the boundaries of the sprite.