Hello all,
I am trying to get these wind turbines animated for use in a game using Unity.
How would I go about animating these so the animation loops in unity?
Will the blades be separate objects or does the entire fbx file havto be one object?
how would I export the animation for unity and how do i tell it to begin looping once the object is visible?
Replies
For a basic animation where the windmills just sit there and the blades turn, your objects will need to be in at least 2 pieces: the tower and the fan. The primary object will be the tower. The fan will be parented to the tower, and you'll want to make sure the pivot is centered properly so that it rotates right.
First of all you can make one turbine then copy and paste, you have to make two object the fan and the base. to be honest i don't think you have to go in and make an animation since you could write a simple script that can make the fan rotate so it saves you time. if its going to be more that spinning create the animation yourself.
Check the unity script reference website for more on how to create the script
http://docs.unity3d.com/Documentation/ScriptReference/Transform.Rotate.html
Either way, definitely have the blades set up how LMP and Nesmos described.
Ok thanks everyone! Ill look into it.
Only issue Im having is if I duplicate the tower and/or combine the meshes, I lose the animation.
Make the turbine a prefab and it should save everything about it, also it might just be that the animation isn't selected
You lose your animations in Maya when you duplicate/combine because you're generating a new object; and keyframes don't transfer to new objects.
You only need one turbine animated in Maya, so export that to Unity (make sure Animations is checked in your FBX export settings), create a prefab, and duplicate that object inside the engine. You should also be able to offset the animations per object so the turbines don't all spin perfectly synchronized.
If you have complex animations with controllers, special inputs etc. you can choose to Bake Animation
From here you can load the FBX file into your Unity Project then set up the animations from within the engine.
It shows up in the little model preview at the bottom right of the screen in unity but it doesnt play once the asset is added to the scene
With no joint system you will need to use the Legacy rig; under Animations be sure to set it to Loop so the turbine will continue to spin.
Thank you.
I got the animations working now how can I export this so my project lead can import the complete model into unity?
(there's four towers, using the same animation, how do I export the prefab?)
Prefab didnt work
You should be able to right click on your prefab and choose Export Package. A window will show up confirming all the related project files (should be source model, textures, and materials). Clicking Export... will prompt an export window where the .unitypackage file will be saved. You can give this to your project lead and he can import it into his scene.