- Home /
Blender Animation Problems
When I make an animation in blender and import it into unity the animations only last for about 20% of the time of which they should. They they seem like they can't be bothered to play the full animation instead with my shoot animation it only goes about halfway up and if you double click then it goes the full up but very fast. Basically the whole animation is messed up in one way or another, Please can anyone help me?
Answer by The-Arc-Games · Nov 06, 2011 at 04:31 AM
If you're using the 'default take' animation technique, and then splitting the animations you're in for a headache every time.
To avoid all kinds of timing and looping problems, use the action editor to create the animations (avoid the non linear action editor), when you export your file, the actions you created in the dopesheet are created as a separated animation each.
In this case, you seem to have a non linear action problem in your blender file.
Yes, writing down frames and re-entering them in Unity to hand-split one combined defaultTake is a pain. But, let's say you have animations created that way, and are convinced that setting them up in Unity will be less work than redoing them the right way in the source program.
Have you noticed any unfixable problems using the DefaultTake method?
The only unfixable problems that we know of are related to the NLA editor, you just can't 'fix' animations done with that ins$$anonymous$$d of the dopesheet and the action editor. Additionally, do know that the FBX format does not have an 'animation length' parameter, and the only thing that actually tells where's the 'end' of an animation in the default take, is the last frame in a predeter$$anonymous$$ed keyframe slice. You can run this test: 1 - create a backup copy of your file 2- delete all animation but one that gives you problems 3- export and check if it's working. If it's not working, then it seems like it's non linear... and you'll have to redo it :(
Answer by Owen-Reynolds · Nov 05, 2011 at 04:17 PM
Can change the speed using: animation["shoot").speed=0.5f;
in Start.
Try testing by setting each animation to loop, and setting it as default on the model with no script (to be sure a script isn't Stopping/Changing it.) That way you can be sure you have the correct frames, imported properly, etc... .
CrossFade gives a nice fade in/out, but if you use it for a short PlayOnce animation, it fades out way too soon, so appears to go halfway. Try either CrossFade("shoot", 0.05f); // shorter fadetime
, or look at the layers animation section to avoid needing CrossFade alltogether.
Answer by gundream · Nov 06, 2011 at 06:35 PM
I think Blender 2.60a has bugs exporting animations in some formats. I would try other exporting format and/or Blender version.