- Home /
Duplicate Question
The whole YZ mix up from blender to Unity
I've searched and searched trust me, I've seen many threads with "solutions" and workarounds but I can't seem to make anything stick. My issue is that I get a model from my modeler and import it into Unity. Unity creates a parent-child tree that looks like "Cannon->armature->CannonBaseBone->CannonGunBone->CannonBarrelBone". The problem is that Cannon works fine XYZ coords are all fine. Armature and everything below it have their XYZ's messed up and end up being like YZX. Trying to export with the UP and Forward as anything just ends up rotating the model when I drag it into the scene and then the parts have their XYZ coords set up to be like XYY which doesn't make sense. I'm really at the end of my rope here, I'm not really a modeler so I've not exhausted all of my options since there certainly are people getting around this issue.
This issue breaks any script that might take advantage of "Lookat()" due to the XYZ being all fudged. Any help with this would be great, I've put a lot of time into learning Unity and I'd hate to walk away over this one issue.
in video game engineering, everything is Z forward. every car, every car part, every creature. it's a basic. if your modelling $$anonymous$$m built it the wrong way they must rebuild it. asked thousands of times here, note the answer , http://answers.unity3d.com/questions/433857/how-to-make-blender-bones-forward-z-axis-unity.html
This isn't just blender. All(?) modeling programs use Z-up.
Now you know that there's an issue, so make some small test models to solve it. $$anonymous$$aybe modeling Y-up will work (but many modelers don't know the difference between rotating the mesh, and rotating the object.) Now you know the "rotate on export" checkbox is garbage (it is.) $$anonymous$$aybe the parent-child trick will solve it. If your modeler has a high-poly (non-game) background, it's trickier to communicate.
The rule for developers is: anything you're doing for the first time, budget a few days for weird problems (and be filled with superstitious dread if it works right away.)
Answer by morgan23 · May 24, 2014 at 12:43 AM
you mean the rotation differences between blender and unity right? I found a useful add-on if thats the case this should fix all your problems. look for the add-on Unity-Tools.PY on google I use it too fix my rotation problems you should be able to get it working.
I'm not sure which tools you're talking about but most of the blender add-ons I sent my modelers way didn't really do much except invert directions or make the YZ both what X should be. The whole issue has cause me such a headache and I'm curious how other people get around this so easy. I'd like to point out again that "Cannon" rotates fine but the child object "CannonGunBone" does not. Everything tried doesn't even change the way it rotates. Is my modeler doing something wrong? Should there not be bones in the model or should they have some secret rotation I don't know about?
Hmm i'm not 100% sure I just thought this add-on might help since it sounded too be like a rotation problem but sounds like your modeller's might of did something wrong. Just too be be sure before I look at it my self it has too do with some of the bones rotations right?
Yes, if you look at my first post I outlined how my modeler layed out his bones in the object. The bones (should) have the proper rotation and everything but I have the issue where the XYZ coordinates seem shifted to the left so they end up YZX. Again, this entirely breaks "LookAt()" since the coordinates are messed up. I can upload a .blend file or FBX if you'd like to have a look at it.
sure i'll look at it too see for myself I was gonna try and see if I can replicate what you mean by do a quick test model in blender then rigging it.
I'm sure there is some glaringly obvious reason this doesn't work, but I spent 6 hours passing this model back to my modeler trying to figure it out and I just had zero luck. The attachment thing won't seem to upload so I hope a link doesn't break any rules or bother you. http://puu.sh/8ZfjV