- Home /
How to find what object "scaling" number is 1 unit?
I am trying to align a bunch of cubes so that there is no gap between them and I made the scale to 250. And I have the snap settings at 2.5 so they are almost aligned, but there is a barely visible gap between them. So how do I find the number of...scaling units I guess, that is equal to 1 unit. I hope that makes sense. I just want to snap them in place where there is no gap between the cubes basically, so what scale number do I need to set the cubes to? Thanks in advance. :)
Are they custom cubes or Unity standard primitive cubes? With the Unity cubes you don't really need snapping to align them, a Unity cube scaled to 250 is 250 wide, so the next cube needs to be exactly 250 units away from the other one. Although snapping works just as well, just keep in $$anonymous$$d that snapping does not snap to the snapping value, but rather to the next value which is snap value distance away: If the start x position of an object is 37.36 the next value snapped to would be 39.86. So to align the cubes with a snapping value they need to start on the same position.
Answer by Nymisu · Feb 19, 2015 at 08:58 AM
Scaling is relative to the object size. With unity's own cubes, a cube of scale 1 is 1*1*1 units, and respectively, scale 3 is 3*3*3. If you make a cube yourself in whatever 3D program you utilize, it could have a normal unit-size of 9.533³, but with a scale of 1.
To calculate the scale of a cube that's custom, i'd recommend utilizing the difference between collider.bounds.center and collider.bounds.extents.y(for instance)