Hi, what I have previously been doing is grouping my whole scene as one complete group, exporting it to Unity, and then dropping the animation controller onto one of the objects, and my scene works fine.
But I want to export the models that will be ‘static’ to be exported separately as ‘Group A’, and then either in another group ‘Group B’ to export my models that are being animated, or each animated model separately.
I try as test to export 1 animated model seperately, from Maya to Unity, but there is a problem with the position. I know its to do with the local position, or pivot on a certain child, or root, but I cant quite figure it out. I have spent more most past of 2 hours grouping, parenting, positioning, re-positining this 1 animated character but cant get the exact position in Unity.
Hopefully someone can enlighten me on the issue and tell me how I can fix this.
I really hope you aren’t doing all objects in the scene as 1 mesh. You should have separate meshes for each object so you can move them or clone them. For example, that hedgehog should be its own model so that you can use Unity’s transform tools to move it in a Unity scene.
In theory, it’s possible to make all objects as 1 mesh, but that’s also a performance drag as you can’t use Culling or Occlusion Culling.
Hey, no no there not all 1 mesh. They are all seperate objects/meshes, my whole scene is not combined as one if thats what you think haha. Its just when I try and export them as seperate groups, the position is not working out for me. But grouping them as 1 whole group (not combining them) but grouping them, they export and position is fine in Unity. I want my static objects separate from my animated ones but its not working out. I will keep trying different ways but not confident on it.
I think that it would be easier to save each object as a separate model and then group them as you wish in the hierarchy (using the parent/child structure).
For example, save the hedgehog as a FBX (or something else supported). Then put it in the project and into a scene, and position it in Unity. Looking at the FBX importer documentation, there’s nothing that gets position, so that’s why I’m confident that the best way is to position the objects in Unity Editor, not Maya.
Yes you just mentioned the same suggestion my teacher mentioned to me today (and something I thought of yesterday to do). Export one animated object/animal separately, and in Unity put that inside an empty ‘GameObject’. And just move the game object. I just have to have my whole scene(including the animals on correct position) as a ‘base template’ just to see where I need to position each of my (new grouped) animated animals (the base template will be my whole scene as a group export, including the animals, and I just place the new fbx animals over the old ones), if that makes sense but dw it it doesnt.
I mean my teacher couldn’t find why the position was not always the same in Unity as it is in Maya. My ‘Static’ meshes that will not be moving, I freeze their transformations in Maya and they are positioned perfectly in Unity. I grouped the ‘main_hedgehog_controller’ inside an empty nurb control/locator in Maya, and froze the transform but that did not do the job. He just said to me, its not a major issue if I group my whole scene into one group and put that into Unity; it does not effect performance for me and seems to be fine.
But I will either do your way or just have it as a whole group. I did think of your suggestion the other day, but was under the impression that you must always keep every objects position 1,1,1 and never re-position it, not even the empty GabeObject I will put my hedgehog through. But as you mentioned it also, I am sure it will be fine?