- Home /
What should my gravity be if I've modeled in feet and inches in Max?
Hi all,
I've been doing modelling in 3DS Max for a while now, mostly dealing with special effects and architecture. As a result, I've been modelling things in real world American scale, feet and inches with units set to 1 unit = 1 inch.
I know in Unity, units only matter when physics are involved. I want to use the physics engine, so I'm wondering what I need to set my gravity to if I want it all to work swimmingly. Any thoughts?
Additional information: Oddly, even though things are set to real-world scale, when I import them into Unity, everything is weird. A 5'4" human comes up to be about a third of a unit in Unity rather than closer to two units as expected. In FBX export, if I change the Units setting from Automatic to Meters, my human comes in super, super tiny. Maybe a couple of relative inches. I don't know exactly what's happening to my scaling here, either.
you will save yourself an incredible amount of trouble, if you model in meters and kilograms
(note that I feel "the metric system is for idiots who can't divide by 12" and I only use the British Imperial system in day to day life. Nevertheless, you're just hurting yourself by not using meters and $$anonymous$$G in Unity.)
in feet, gravity is of course 32.174 ft/s2
regarding importing scale, it is an endless problem for everyone. you may not have noticed there are various "scale" thingies on the "import" panel, inspector. if you click on the asset - sometimes but not always that helps :O
I don't see that happening, to be honest.
1, because I don't want to have to keep switching back and forth between units systems when I do architectural work.
2, because doing so with current models requires me to scale them down and when it comes to CAT-rigged models, even scaling with the rig resizer can be a huge headache with stretching and bones getting out of place. Ugh.
3, because I have almost no mental concept of how long meters are. I know, it's approximately 3 feet. But I'm going to have to relearn my sense of distance and scale if I do this.
And this is from a guy who thinks the US should exclusively use the metric system moving forward :P
However, thank you for the other leads. I did fix my problem by writing an editor script to set my default import scale for FBX to 0.054, which I settled on after a little trial-and-error and a little maths. Now everything is co$$anonymous$$g in at a "close enough" size and should work famously for the physics system, as my 5'4" character's collider surrounds her closely with a height of 1.63 units, or 163 theoretical centimeters.
Thanks!
Answer by Paulius-Liekis · Dec 10, 2012 at 11:06 AM
You can adjust size of imported object by changing import scale. I would recommend doing that - it will be easier to set up physics.
Yes, thank you. This is exactly what I needed to do.
I also wrote an editor script to make sure the import scale is uniform across all imported objects by changing the default.
Here's the script in case anyone is having the same issue. It's in C# and goes in Assets/Editor.
Answer by Panopolos · Dec 10, 2012 at 06:12 PM
using UnityEditor;
public class FBXScaleFix : AssetPostprocessor
{
public void OnPreprocessModel()
{
ModelImporter modelImporter = (ModelImporter) assetImporter;
modelImporter.globalScale = 0.054f;
}
}
Answer by Imankit · Dec 25, 2012 at 03:20 PM
I don't think you have to change any gravity hee.. Gravity only produces acceleration towards ground and is regardless of you model's metres or inches... It depends upon the mass of the object...
And in unity whenever a fbx is imported it automatically scales to 0.01.. Change it to 40 if you want inches to be in metres..
Your answer
Follow this Question
Related Questions
Physics gravity appears very weak 2 Answers
How to make a object jump constantly at y and move to the next position to z (perfectly) 0 Answers
How can I turn on/off Rigidbody.useGravity? 0 Answers
How to make rigidbodies on each side of a cube fall towards the cube? [multiple gravity / addForce] 0 Answers
My objects keep falling through 1 Answer