c# - How to load fbx model to XNA? -


i new xna, , try load model, not loaded properly.

the model looks in visual studio:

enter image description here

and looks when try display:

enter image description here

my code 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();         } 


Comments

Popular posts from this blog

java.util.scanner - How to read and add only numbers to array from a text file -

rewrite - Trouble with Wordpress multiple custom querystrings -