Sign in to follow this  

Animations snapping/cutting off before they're done

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"];

// 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 this post

Link to post
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 this post

Link to post
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.

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this