Game Development Stack Exchange is a question and answer site for professional and independent game developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have several models here. When they stand still during gameTime, there's no flickering. But as soon as I move them across the x-axis, they flicker on some places.

protected override void Draw(GameTime gameTime)

    Matrix[] transforms = new Matrix[myModel.Bones.Count];

    foreach (ModelMesh mesh in myModel.Meshes)
        foreach (BasicEffect effect in mesh.Effects)
            effect.World = transforms[mesh.ParentBone.Index] * 
                * Matrix.CreateTranslation(modelPosition);
            effect.View = Matrix.CreateLookAt(cameraPosition, 
                Vector3.Zero, Vector3.Up);
            effect.Projection = Matrix.CreatePerspectiveFieldOfView(
                MathHelper.ToRadians(45.0f), aspectRatio, 
                1.0f, 10000.0f);

Why is that happening and what could I do to prevent it?

share|improve this question
Does the flickering look like Z-fighting? – Andrew Russell Apr 30 '13 at 11:16
Probably something like that. When they are static the math turns out with the same results, once they move it flip flops between different states. It can be z-fighting or aliasing with different results. – rioki Apr 30 '13 at 12:37

Issue was easy to solve:

My farPlane was too much (actually 10k). So I reduced that to 3k (according to my models) and also important is the nearPlane, which was at 0.1f. I changed that to 1 and now everything works!

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.