- Home /
How much is a meter in Unity?
Unity's measurements are confusing me a bit. How many pixels is a meter?
Also, when creating 'Other' objects (spheres, cubes, etc.) how do you know how tall/wide they are? When I used UDK, it would let you define their X/Y/Z sizes before you made them...can you do something like that in Unity?
Thanks!
Answer by Eric5h5 · Jul 30, 2011 at 11:38 PM
"How many pixels is a meter" doesn't really make any sense...pixels are a screen representation, and units are world measurements. Assuming you use 1 unit = 1 meter, how many pixels that is depends on how far from the camera you're measuring and how many pixels your display uses.
When creating primitives, cubes and spheres are 1 unit big, cylinders and capsules are 2 units tall, and planes are 10x10 units. You can scale them after you make them.
Answer by ThomasQ · Jul 30, 2011 at 10:29 PM
The units used are meters / metric system. So make a cube of 1 x 1 x 1, it's 1 meter high, wide and deep..
How many pixels that is is not relevant, because you zoom in and out with the camera..
The units in Unity are just units. Typically it's meters, particularly because of the default gravity settings, but there's nothing stopping you from using units to mean millimeters, or feet, or light-years.
The Physics engine works with scales appropriate to 1 unit = 1 meter, so accuracy issues will creep in if you take those scales to be something extremely smaller or larger than that. Also you will hit Floating point limits at large scales so after a few miles let alone light years the numbers do not have enough accuracy and things will get very weird indeed.
As is demonstrated with $$anonymous$$erbal Space Program and the $$anonymous$$raken issue - on the planetary scale.
Answer by SirMacJefferson · Jul 31, 2011 at 07:06 AM
I see..I think I've got a firm grasp on it now.
Thanks for the help!