Sign in to follow this  

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

This topic is 2394 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?


http://www.youtube.com/watch?v=nU9MWDZpIt0

Share this post


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

Add the following code before the XNA Model Draw code
[code]
// Set suitable renderstates for drawing a 3D model
GraphicsDevice.BlendState = BlendState.Opaque;
GraphicsDevice.DepthStencilState = DepthStencilState.Default;

// your model draw code starts here...
[/code]

Source: [url="http://www.nelxon.com/blog/xna-3-1-to-xna-4-0-cheatsheet/"]XNA 3.1 to 4.0 Cheat Sheet[/url]

Share this post


Link to post
Share on other sites

This topic is 2394 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.

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