Hi. I was wondering if you guys knew what I might be doing wrong.
In Maya I have cubes that have transform settings as:
x=0
y=.5
z=0
in meters.
The cube’s dimensions are 1,1,1. Thus, this puts the cube sitting right on top of the ground plane. With the ground plane height being 0.
So, when I import it into Unity, the transform attributes are as follows:
x=4.060173
y=1.638752
z=-.1527138
This is at default import settings. Funny thing is, I’ve tried experimenting in Maya where I was using Inches, Meters, Centimeters, etc… just to see how they would import into Unity so I could see which settings would work and which would cause scale issues.
So far, scale issues or not, the Tranform attributes seem to come across as the same. It’s consistent. Unfortunately, it’s consistently wrong.
I’d like to be able to have my artists create something in Maya with real coordinates and then be able to drop them into Unity and have them appear in the right place. So I could have several artists working on assets for the same scene and be able to predict where assets will appear in Unity without asking them to do any more math than necessary.
I know it’s not a parenting issue since I’m not doing this with any real project files. I just opened up a new blank Maya scene and created a 1,1,1 meter cube. I then tried exporting as .mb, .ma, and .fbx using different Working Units in Maya so I could see how they scaled differently.
I imported them into a brand new Unity project.
I just tried it again, but this time my cube in Maya was at 0,0,0.
When in Unity it comes up as
4.060173
1.638752
-.1527138
That’s its position in world space. I’ve dragged things into the scenes dozens of times, but they’ve never been in the position marked inside the 3D editor.
It’s no big deal, really. You can just set the position by hand.
There’s a difference between dragging into the scene view and dragging into the Hierarchy…if you drag into the scene view, Unity tries to put the object in front of the view so it’s immediately visible. In which case the position depends on where the scene view camera is. Otherwise, if you drag into the Hierarchy, Unity uses the object’s actual position as defined in the file.
I’m still getting a strange value for my X transform.
-7.105427e
Which… for a an unknown reason happens to be in the same exact physical position as 0. So it’s not a big deal. The object is where it’s supposed to be. Just strange.
That’s scientific notation for a very small value, which is very close to 0. Must be just slightly off in your 3D app, or else floating point imprecision is making it slightly off in Unity, but in any case it’s not enough to worry about.
Unity itself gives me the miniscule values all the time. Blender’s zero ends up being one of those tiny values, also, more often than not. Just ignore it.
OH!
And let’s not forget about my personal favorite, -0. That’s negative zero. Unity loves to serve me that, as well.