Polygon Collider 2D: prevent automatic generation

Hi Folks,

When I add a polygon collider 2D component to my GameObject, it automatically forms a shape roughly equivalent to the shape of my sprite, but I’d prefer to create it myself from scratch. How do I prevent the auto-generation from happening, forcing me to delete each individual vertex manually?

Thanks for hearing me out :slight_smile:

If you want to use a polygon collider and not an edge collider, there’s actually a simple work around. Just attach your polygon collider to the game object BEFORE you add the sprite. Then add the sprite. The polygon collider won’t readjust itself to match the sprite and now you can adjust the polygon collider as you like. :slight_smile:

You can use the Edge Collider 2d component. This enables you to edit the vert points to your wishes (basically lets you make your own collider from scratch)

(It starts as a straight line but you can edit the length of it by just dragging and you can click to create more verts and move these verts), This way you reduce the total amount of verts and edges. I find this way better than the polygon2d component.