I am very new to XNA, and I try to load a model, but it is not loaded properly.
The model looks like this in visual studio:
And it looks like this when I try to display:
My code is this:
Matrix[] transforms = new Matrix[BilliardTable.Bones.Count];
this.BilliardTable.CopyAbsoluteBoneTransformsTo(transforms);
foreach (ModelMesh mesh in this.BilliardTable.Meshes)
{
foreach (BasicEffect effect in mesh.Effects)
{
effect.EnableDefaultLighting();
effect.World = transforms[mesh.ParentBone.Index] *
Matrix.CreateRotationX(120)
* Matrix.CreateTranslation(Vector3.Zero);
effect.View = Matrix.CreateLookAt(balls.First().cameraPosition,
Vector3.Zero, Vector3.Up);
effect.Projection = Matrix.CreatePerspectiveFieldOfView(
MathHelper.ToRadians(45.0f), balls.First().aspectRatio,
1.0f, 10000.0f);
}
mesh.Draw();
}