Quantcast
Channel: Active questions tagged xna-4.0 - Game Development Stack Exchange
Viewing all articles
Browse latest Browse all 33

Xna model parts are overlying others

$
0
0

I am trying to import in XNA an .fbx model exported with blender.

Here is my drawing code

public void Draw(){    Matrix[] modelTransforms = new Matrix[Model.Bones.Count];    Model.CopyAbsoluteBoneTransformsTo(modelTransforms);    foreach (ModelMesh mesh in Model.Meshes)    {        foreach (BasicEffect be in mesh.Effects)        {            be.EnableDefaultLighting();            be.World = modelTransforms[mesh.ParentBone.Index] * GameCamera.World * Translation;            be.View = GameCamera.View;            be.Projection = GameCamera.Projection;        }        mesh.Draw();    }}

The problem is that when I start the game some model parts are overlying others instead of being behind. I've tried to download other models from internet but they have the same problem.


Viewing all articles
Browse latest Browse all 33

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>