Box Collider 2D edge collider spacing, scale problem or something else?

There doesn’t appear to be any issues with the circle colliders. But it seems as if the edge and box colliders have padding around them.

Bringing the scale into larger ranges visually reduces the issue, but the invisible padding still seems to exist.

Can anyone provide some insight to this?

This is something that many others are reporting as well. I just tell them all to reduce the size of the box collider if it’s hindering their game play. Have not yet confirmed if this is a bug or by design.

Not sure if this is the same issue, but something similar was happening to me. I was using a sprite as a prefab for platforms, but the box colliders were larger than my sprite. I read somewhere that 1 unity in unity is 100 pixels. I resized my image accordingly and it ended up being a snug fit.

Anyone figure this one out yet?

This is not a bug, it’s part of the way Box2D works. Box2D implements a “skin” around polygons/edges (this means “box” as well which is just a polygon).

You can read about it in the Box2D manual and FAQ here:

http://www.box2d.org/manual.html
http://code.google.com/p/box2d/wiki/FAQ

There are many references to it on the web as well.

Sorry for bumping up this old thread, but I’m having some issues when setting up the Box Collider 2D for bodies of 1x1 pixels size.

2793343--202564--Screen Shot 2016-09-19 at 11.21.35 AM.png

The objects are debris that should interact with the physics world but they stack on top of each other with a gap when using a box as collider, for circles they work just fine.

2793343--202565--Screen Shot 2016-09-19 at 11.22.29 AM.png

What would you recommend me to do in order to reduce this gap between the debris? any help or comment is appreciated.

Regards.