Animations snapping/cutting off before they're done

This topic is 1766 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

Recommended Posts

I'm using SkinnedModel and attempting to play animations for my models. I have all animations in one fbx file, as that's apparently supported by XNA 4.0 Refresh, but now I'm not too sure about it; all my animation clips show up as having the same duration and number of keyframes.

What I'm doing is same as in the skinned model sample:

// In LoadContent()
SkinningData skinningData = currentModel.Tag as SkinningData;
animationPlayer = new AnimationPlayer(skinningData);
AnimationClip clip = skinningData.AnimationClips["Walk"];
animationPlayer.StartClip(clip);

// In Update()
animationPlayer.Update(gameTime.ElapsedGameTime, true, Matrix.Identity);


Am I missing something? Is having all animations in one file the reason for my clips all having the same duration/number of keyframes?

Edited by ymiaw

Share on other sites

I can't answer your question as I don't know what FBX exporter you use or even anything about FBX exporters :)

So what have you tried? Are you willing to place two simple animations like idle and walk in two different files using your export process and see if the duration/number of keyframes is still equal and whether this resolves your "snapping" problem?

By the way, without seeing a video, I can only hazard a guess that your "snapping" problem might actually be a looping non-treadmill animation reaching its end and then snapping the root bone back to the beginning frame.

Share on other sites

Whoopes sorry, forgot to say that I was using Blender 2.6. I have tried to separate the animations, and it does resolve the problem, but it's not the solution I'm looking for--I want to know whether or not it can be fixed with all animations in the same file, as I doubt I'm the only person to have ever done it this way and yet have not found any similar problems reported.