# Model draws always on front [closed]

I have a couple of Models here, but there's only one, which will always draw in front of the others.

I tried to replace the asset-source to an other model and then the order is correct, but on this particular one, it won't render behind the other model like it should.

See the problem here (Problematic model is the dark mountain)

http://s1.postimg.org/d92ku9mvh/image.png

Why is that happening?

-

## closed as too localized by Byte56♦, bummzack, Anko, msell, NateApr 30 '13 at 21:51

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

You should probably post some code. Until you do, it's just a guessing game about what's wrong with your particular method. –  Seth Battin Apr 24 '13 at 20:18

Make sure that the winding order is correct for this model. Try drawing the asset with an opposite winding.

-

I haven't wrote anything in XNA for a long time, but I think one of those XNA settings should solve your problem

 rs = new RasterizerState();
rs.CullMode = CullMode.None;
Device.RasterizerState=rs;


or

 Device.Clear(ClearOptions.Target | ClearOptions.DepthBuffer, Color.AliceBlue, 1.0f,0);
Device.DepthStencilState = DepthStencilState.Default;

-
I wrote that into the main Game-Class' init method. Didn't work :/ –  IMX Apr 25 '13 at 0:05

Seeing as how it works correctly when using another model, have you check the file to make sure the vertices are in the correct place? Can you rotate the view around to see if the model is physically in-front of the models or if it's just rendering weirdly?

-
I've rotated it. Shows correctly but still draws not in order –  IMX Apr 25 '13 at 0:10

The problem was the Z-Axis.

The model had an immense length regarding the Z-Axis, so that it seemed "always not drawed in order"

So solution: Decrease length in Z-Axis

-