I have a mesh from Maya in an .mb file with basic animation (no bones) and a psd file attached.
When I load it into Unity is shows perfectly when I tell it not to run the animation and go into the game. Mesh+texture is ok. I have scaled it up by a factor 10.
When I tell it to run the animation from beginning and loop it/or not loop it - it disappears inside the game. And it does not show again.
I have also tried to add a script to run the animation in code - same result.
Most likely the animation is doing something weird to the mesh like flinging it out to space or scaling it to nothing.
Set the animation to play on start, then start the game paused and advance through frames.
The moment the mesh vanishes, select the object in the scene hierarchy and check where it is in the scene. Hopefully it’ll give you some clues as to what’s going on.
Hi again
Thanks for the fast reply.
I opened the Animation Panel while in pause mode and you are right.
The model is located elsewhere in my world.
Interesting is that it is now in the animation placed where I placed it in Maya, so it keeps the values.
Now how can I change this?
I have added the Mesh into the area, 650,20,1177, but when it starts to animate it goes to 20, 5, 20 - the maya value.
What am I doing wrong? How can I make the animation understand that it is not a global value?
I also tried to bake from Maya, but same result. any ideas?
Thanks, miko
To get something to animate relative to where you place it, you’ll need to adjust your hierarchy a little.
You need a root node with no animation on it. (put the animation on the nodes below that) That way you can reposition the object without the position being overridden when the animation starts.
The other method is to parent the whole thing to an empty game object in Unity and move the game object to position the object. (it’s basically the same technique, just in Unity instead of Maya)
Thank you.
The empty gameobject helped.
I also tried the locator in Maya - success.
I think this conversation can help many Maya people because nowhere you can read about this. All tutorials explain that you must simply save from Maya and then import to Unity.