- Home /
.blend/.FBX legacy animations don't play
I have imported a single-take animated .blend file into a scene and set its animation mode to Legacy, split its animations to the appropriate lengths, and then configured the Animation component and the default ThirdPersonController component as they are supposed to be. The animations appear correctly in the animation preview window, but do not play in-game. The model stays locked in the first frame of a given animation. I have checked out every angle I can think of and I don't understand why this is happening. Has anyone had a similar issue?
Answer by uberokeer · Mar 12, 2013 at 07:49 AM
I tried using the default character controlers but i couldn't get them to work either. So what I did is made my own script for controls and I used:
animation.play("animationName"); //The animation must be on the object you put the script on, via the animation component.
Resources:
http://docs.unity3d.com/Documentation/ScriptReference/Animation.Play.html
EDIT: You can also use other things in the animation function Such as:
animation["animationName"].speed = 15; //Sets the speed of the animation.
animation.crossfade("animationName"); //returns character to default position when done playing animation.
you can also use animation.isplaying in a if statement: example:
if (animation.IsPlaying){
// Do something if there is a animation playing.
}
Your answer
Follow this Question
Related Questions
Can I make animations snap to a frame? 1 Answer
Strange animation glitch-mangled character 0 Answers
Fbx animation's rig go wrong after importing 0 Answers
How to select an animation clip by index number? 7 Answers
Importing Maya Model to Unity3D 1 Answer