XNA CustomModelAnimationSample problem

Posted by Mentoliptus on Game Development See other posts from Game Development or by Mentoliptus
Published on 2011-11-14T17:14:35Z Indexed on 2011/11/14 18:14 UTC
Read the original article Hit count: 324

I downloaded the official tutorial from:CustomModelAnimationSample It works fine but when I try to replicate it in my project, it fails to load the Tag property in my model.

Is found that the probelm is in the line:

skinnedModel = Content.Load<Model>("DudeWalk");

This line loads the model from the DudeWalk.fbx file and with the custom SkinnedModelProcessor. It loads the animations data in the model. After the line the Tag property is full. I stepped into the method and it went to the custom ModelData class.

I copied everything from the projects CustomModelAnimationWindows and CustomModelAnimationPipeline to my solution and set all the references. I tried the same line of code and couldn't step in the method. It called the default method or model constructor and after the line the model's Tag propetry was null.

I have to load the model through my custom SkinnedModelProcessor class, but how I tell the game to use this class? In the tutroail CustomModelClass the line is changed to:

model = Content.Load<CustomModel>("tank");

So I assumed that I have to set the generic type to a custom model class, but the first example works without it.

If anyone has some useful advice or some other helpful link, I'll be happy to try it.

© Game Development or respective owner

Related posts about xna-4.0

Related posts about xna-content-pipeline