Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

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 currently have an object made up of only one mesh. And this object contains three bones. One for stretching the mesh left, one for stretching the mesh up, and a center bone, which moves the object around. This is how my model and the bones/mesh hierarchy looks like:

Now, the problem is I don't know how to draw this mesh in XNA, I mean I don't know which transform to use.

I am using this code to draw:

Matrix[] transforms = new Matrix[model.Model.Bones.Count];

foreach (ModelMesh mesh in model.Model.Meshes)
    foreach (BasicEffect effect in mm.Effects)
        effect.View = camera.view;
        effect.Projection = camera.projection;
        effect.World =; //I dont know which to use

If I debug it, and then look at the code, it comes up with 7 bones in this order (as seen in the picture):

  • Obj,
  • CenterArmature,
  • Center(CenterArmatures bone),
  • GorArmature,
  • Zgoraj(GorArmatures bone),
  • LevoArmature,
  • Levo(LevoArmatures bone).
share|improve this question
Why do you have three armatures? You should put all three bones into one armature instead. Then you can use the vertex group weights named the same as the bone to know how much each bone influences a vertex. – ccxvii Feb 3 '13 at 11:46
How can add all bones under one armature? Under add I only have Armature->SingleBone, which creates a completely new armatue. – user1806687 Feb 3 '13 at 12:03
So I have manged to add bones to armature by extruding from one bone and then disconnecting(removing the parent) of the new bone. But now if I am in POSE mode and move the new bone, the mesh deformation is delayed, its not synced with the movement of the bone and it rotates the mesh insted of just moving it. – user1806687 Feb 3 '13 at 13:01
Have you done any weight painting to assign vertices to bones? Maybe you should watch some tutorials on rigging and animating in blender.… – ccxvii Feb 3 '13 at 15:18
Weight painting is done correctly, so are vertex groups and their names. – user1806687 Feb 3 '13 at 15:27

Your Answer


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

Browse other questions tagged or ask your own question.