(blender) model not playing animation

Hi,

I have made a windmill model in Blender and added an armature and an animation to it. But I cannot get the animation working in Unity (in Blender and other model editors it shows fine).

  • I have imported it as fbx and set its animation type as generic (mecanim?) and added an animator component to the gameobject windmill prefab (apply root motion is ticked on & update mode = normal).
  • I edited the animator object in the animator window and added 2 anim states (1 is idle and 2 is rotating the rotor blades) and transitions between the two and a parameter ‘RotateSpeed’.
  • I added a script to the windmill which runs/calls a function with the line: animator.SetFloat(“RotateSpeed”, bladesRotateSpeed); (also tried putting it in Update but that doesn’t seem to work either)

I get no errors but the animation just doesn’t show up. What am I missing?

Here is the fbx model: http://wikisend.com/download/975190/Windmill.fbx

Thanks for taking the time.

Edit- added pics (please scroll to below in the page to view the 2nd pic too):

Hmm, something seems a little messed up with your FBXs animations, things seem a bit broken when it gets the the end and tries to loop. Guessing that is probably the main issue, but what have you set up as the conditions for your two transitions as well? You may be better off trying to import the Blend file directly… we’ve also had many issues using FBXs exported from Blender.

Btw, not sure if you only want the two states, but you may want to look into just having the single looping animation, and adjusting animator.speed in order to increase and decrease the speed of the animation… just a thought.

_
I’m not sure if this is helpful, but I was just importing a BOW & ARROW animation from Blender, and I could see the animation playing in the Importer window, but it would not play in the scene itself through the Animator (I’m using a Blend Tree).
_
I went back to Blender and added another keyframe after the end of my animation timeline, and exported again, and it worked!
_
So I think somehow, I needed to “bookend” my animations with a key “before the start” and “after the end” of my actual animations themselves.
_
This may help someone, one day. :smiley:
_