I have a problem that XNA 4.0 is not displaying a 3D FBX model correctly.
A friend created a model and when I open this in FBX Viewer it displays it correctly
https://docs.google.com/open?id=0B54ow8GRluDUYTBubTQ4bjBramM
But when I load it into XNA and click run, it displays as
https://docs.google.com/open?id=0B54ow8GRluDUSE14TWMxcnBJWWc
The code that i have for the drawing is
foreach (ModelMesh mesh in model.Meshes)
{
foreach (BasicEffect effect in mesh.Effects)
{
effect.Projection = projection;
effect.View = view;
effect.World = Matrix.CreateScale(1.0f) * Matrix.CreateRotationX(90) * Matrix.CreateTranslation(position);
effect.EnableDefaultLighting();
}
mesh.Draw();
}
Any help to fix this will be very much appreciated.
Thanks.
Each mesh has a bone… and you should use it to position the mesh in the right place… this code is from Microsoft
You can found it at http://msdn.microsoft.com/en-us/library/bb203933(v=xnagamestudio.40).aspx