Jump to content
  • Advertisement
Sign in to follow this  
ayrton2388

Created my own animation library, but got a bug in XNA 4

This topic is 2580 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`ve been working with xna 4, mostly.

So. I created my own animation library, based on XNA 3.0 From novice to professional.
It works great in XNA 3, but has a strange bug in XNA 4.0. The models get deformed in a strange way. My models are limited at 58 bones for now, since the code was for XNA 3. But anyway. I also tried to import these models in Microsoft`s skinning samples for 3.0 and 4.0. Again, in XNA 3, it works perfect. But in XNA 4`s skinned model sample, it has the same bug as my library. I also tried AnimationComponent library from CodePlex. Once again. Works great for XNA 3, bugged animation in the updated AnimationComponent for XNA 4.

Any idea what could be wrong? See the leg bending backwards? from the knee?


Share this post


Link to post
Share on other sites
Advertisement
You could try this, XNA 4.0 went through some changes from 3.1.

Add the following code before the XNA Model Draw code

// Set suitable renderstates for drawing a 3D model
GraphicsDevice.BlendState = BlendState.Opaque;
GraphicsDevice.DepthStencilState = DepthStencilState.Default;

// your model draw code starts here...


Source: XNA 3.1 to 4.0 Cheat Sheet

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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!