Collider size and transform scale

I’m a tad confused as to the size property of a box collider. From reading the docs, it seems like it should be a multiplier of the transform scale of the gameobject itself.

Therefore, shouldn’t a value of 10 for the x/z collider size give me a size of 240x320, ie 10x the size of the mesh? At first glance a value of 1 would be what I would want, equaling the size of the plane mesh. Unity appeared to pull a value of 10 out of thin air and I’m scratching my head. There’s something conceptual I’m missing here and was hoping someone could enlighten me.

The sizes are in units. A box collider with a size of 2,2,2 will be 2 units x 2 units x 2 units. If you have a scale of 3,3,3 for the object then the collider will be 6 units x 6 units x 6 units.

–Eric

Well then my interpretation of the documentation is correct. The only way it makes sense then, is if the default size of the primitives generated by unity are 10 units and not 1. And in fact, zooming in on a new mesh object, it does appear to be comprised of 10 triangles on each side. However, I had somehow assumed a unity ‘unit’ to be one grid square.

Makes sense now, thanks.

Well, it’s only the plane that’s 10 units; everything else is 1.

That depends on how far you’re zoomed…a unit is 1 square if zoomed in far enough; zoomed out more and it’s 10 units, zoomed out still more and it’s 100 units.

–Eric

I have an object which is a 12" ruler with UV of an actual 12" ruler. I have set the Scale in Inspector to .3048 (for that many meters). Still says 12 in the box collider length! In fact no matter what Scale I put in, the GameObject apparent size changes correctly, but the box collider length does not! Makes no sense! Scale should always be 1 in my opinion and use external software to set the actual size proportions and assume Unity uses meters. The biggest flaw of Unity I find is the confusion about the actual size of objects. I am working hard for a solution to this.

I’m here as well while searching for info on why a collider would not inherit its parent’s scale. makes no sense.

1 Like