- Home /
How do I change the Unit size for a project?
From what I've read, Unity defaults to 1 unit = 1 meter. This sounds good to me, but I'd like to verify that the project I'm working on is indeed setup this way. I can the the gravity setting is currently set to -40 instead of -9.1 which makes me think that the project scale is set to something else. Is there a "Unit Size" setting somewhere? A lot of people have been saying that unit size does not matter as long ass everything is scaled together properly but I'm not sure. From what I can tell, gravity, the speed of sound and some other things will be affected. I can't find a Unit setting in the project settings, is it perhaps a unity pro setting only?
Answer by ChefZweegie · Nov 22, 2011 at 07:06 PM
If you create a default cube in your scene, it will be set up as a 1m cube. If what you are concerned about is making sure that objects that you import in are at the proper scale, just set up a scene in your 3D platform, create a 1m cube in it, and then make sure that the cube you import from your 3D platform is the same size as the default cube in Unity. The other thing to keep in mind is that size does matter when it comes to physics. My advice would be to always work in real world units (1 unity unit = 1 meter). Might not matter in some projects, but it is just a good habit to get into... and as you build your own asset library it will make things much easier!
Right. Usually you do not really need to worry about any of the scale until you use physics. Here is the link for a more in depth explanation:
http://unity3d.com/support/documentation/Components/class-Rigidbody.html
I've always made it a requirement to have everyone work with this in $$anonymous$$d and never had any problems, person around 2m, car around 4m... and so on. It makes sense when you read that page.
I should add... the info about needing to think in meters is down towards the bottom... but the whole page is a good read.
Answer by RichardCulver · Dec 12, 2017 at 11:17 PM
Wrong to say it is arbitrary. The default cube is one meter. Because the default unit is 1 meter. There is no program where the units are arbitrary. That is absolutely false. All units have to mean something internally. Not just physics simulation. But Lighting also works on real world scale. All of the math in a program has to be calculated so that a Unit means something. From there you can assign an arbitrary value to a unit. But that is you making that assignment. It is not arbitrary by default.
Answer by Eric5h5 · Nov 22, 2011 at 05:40 AM
A unit is a unit, so there's nothing else to set it to. Units are arbitrary, and only mean what you say they mean. If you put gravity at -9.81, then that means units are meters as far as physics goes, as long as you assume Earth-normal gravity. If you use 343 for the speed of sound in the audio settings, that means 343 units per second.
I know this is old, but isn't the physics engine optimized to handle objects as if 1.0 were actually a meter? In other words, yeah it's easy to adjust gravity (etc.) to make the units feel correct, but then don't you run the possibility of having the physics engine have a less reliable simulation?
Basically what I'm really wondering is: does Unity's Physx have similar unit requirements/restrictions to Box2D? This is from the Box2D guide:
"Box2D works with floating point numbers and tolerances have to be used to make Box2D perform well. These tolerances have been tuned to work well with meters-kilogram-second ($$anonymous$$$$anonymous$$S) units. In particular, Box2D has been tuned to work well with moving objects between 0.1 and 10 meters. So this means objects between soup cans and buses in size should work well. Static objects may be up to 50 meters big without too much trouble.
Being a 2D physics engine, it is tempting to use pixels as your units. Unfortunately this will lead to a poor simulation and possibly weird behavior. An object of length 200 pixels would be seen by Box2D as the size of a 45 story building."
Answer by Xavier78 · Aug 24, 2019 at 05:02 AM
The one-meter means a lot now in VR, and AR. These applications use real-world distances so you have a perfect depth of field.
Your answer
Follow this Question
Related Questions
How to scale down physics engine 2 Answers
How does scale work in nested game objects? 2 Answers
get screen width and height in world size 3 Answers
Unity unit scale compared to Maya 1 Answer
Scaling and Rescaling of Objects. 1 Answer