- Home /
Size And Scale Limitations
Hello.
When I first started downloading Unity assets, I noticed that the x,y,z units seemed to represent about a yard or meter. Reading UnityAnswers, I see units are set to 1 meter, but I also noticed that not all assets follow that rule. Although I see the logic of using meters (Easy conversions from millimeters to kilometers), I would prefer using feet. Two questions come to mind.
First, are there any limits or problems connected with using larger or smaller scales?
Second, should I divide my 4 kilometer by 5 kilometer world into several 1 kilometer by 1 kilometer levels?
I suspect these issues could greatly affect game speed and quality when building a MMORPG.
Answer by MrSoad · Oct 13, 2014 at 07:46 PM
Unless you are using the physics engine(rigidbodies) you should be ok, if things start falling through the floor then scale up. If you are using the physics engine then you will probably encounter problems if the scale is too small or too large. When making a pool game I made the balls, table etc the correct(real) size. Encountered many problems including the balls falling through the table. I ended up making the balls 1 meter in diameter which solved all my issues, though I had to alter the gravity to make them seem like they were small. (Edit: Generally it is best to try to stick to the default scale, this will not be the thing that determines how good or bad the quality of your game in terms of looks and speed, see below)
Game speed and quality will depend more on how you construct the game rather than scale. You may need to use lots of rendering optimization techniques like Dynamic Batching for Draw Call reduction(look up Draw Calls if you have never heard of them) via Texture Atlasing. Minimal code execution, ie only run what needs to be run when it needs to be run. Cache your Transforms as this is much faster, you are doing the equivalent of GameObject.find otherwise every time you move an object. And a whole lot more...
If you were making a space game with spaceships as the player and enemys you would want to make the ships about 1m in length. If you were making a space game where people were travelling in space ships then you would want the ships to be approx the real size for example.
Hope this helps a little.
Answer by robertbu · Oct 13, 2014 at 07:51 PM
There are a number of posts on UA addressing different aspects of this question. Three in particular:
Unity is tied to meters in just a few places related to some form of physics...like gravity and Doppler for audio. If you don't need these features or are willing to code around the values, then you can make your units mean anything you want.
For larger areas like planets or solar systems, you will run into problem due to precision issues with floating point numbers. There are discussions on UA and the Unity Forums on how to address this issue.
There is a maximum velocity in 2D, so in order to get what you want visually, you may have to reduce the pixel to units setting or otherwise reduce the scale.