Jump to content
  • Advertisement
Sign in to follow this  
ymiaw

Animations snapping/cutting off before they're done

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

If you intended to correct an error in the post then please contact us.

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


Link to post
Share on other sites
Advertisement

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
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!