- Home /
Opinion Question: Where should 0,0,0 be on my imported model?
I have a number of different units in my game, using air, land, and bipedal characters. Since I don't have a lot of experience rigging and animating, before I started I wanted to see if the knowledge of the community could keep me from going down dead-end roads.
When I import a mesh, where should the origin (0,0,0) be placed on the mesh (and does it matter)? Should I place the origin in the center (knowledge that could allow me to use bounding sizes more easily)? Should it be at the bottom of the mesh (so the mesh is "walking" on the plane y=0)? Or should it be where the main Camera will be (since many of my meshes will be used for player meshes)? And does the type of model change this (ie. center for air units, but feet for ground, etc.)?
Does anyone have any strong feelings about this (and, more importantly, reasons why this matters)? Before I start the serious vehicle coding (since I'll need to parent main cameras and weapons and such), I'd like to know what experienced modelers/Unity users think about this (and where my choices might cause problems for me later).
Thanks for the input!
Answer by Jessy · Dec 18, 2010 at 09:40 PM
I think this belongs in the forum, for a list of specific cases, but the general answer is short, so I'll give it:
Wherever makes the most sense.
For any-legged or -wheeled characters on the ground, that usually means on the ground, below their center of gravity. The camera is generally a separate Game Object with an offset from the character, so no, that generally isn't the easiest to deal with. For things in the air, you might not have to worry about the ground plane; again, the center of gravity can be a good starting point, but if that causes confusion somehow, move it.
For example, you'd usually want the pivot point of a door, under the hinges, on the floor, to make for easy rotating. Otherwise, you'd need to use bones or another type of parenting system. So if you're dealing with rigidbodies, do whatever most eliminates the need for either. Not only will it save you hassle; but it will yield better performance as well.
Well, I'd hate to cross-post it at the forum now. $$anonymous$$aybe I'll delete and re-post there. BTW, transform.Rotate is around the COG, correct? That gives me one good reason to favor that for flying units...
No, all the transform functions use the "pivot point". That is, whatever (0,0,0) is, in local/model space. You could line that up with the center of gravity, like I suggested, but the actual center of gravity only factors in with the physics system, not transformations in general.
Caveat: According to the Unity manual Hints section, you would want your parent root to be at 0,0,0 before you put any child objs in hierarchy. http://unity3d.com/support/documentation/Components/class-Transform.html
Like Eric, I don't know why the docs say that. http://answers.unity3d.com/questions/32355/parenting-transforms-must-still-set-parent-at-0-0-0
Your answer
![](https://koobas.hobune.stream/wayback/20220613091555im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Handle Many Characters that have skinned mesh renderer 0 Answers
Proper way to import models 1 Answer
Blender FBX import model with animation issues 0 Answers
Jagged and blurry texture on model 1 Answer