I use directx with C# (MDX). And my Task is it so put two Boxes (created with Mesh.Box) among each other.
The top box has:
width: 200 height: 10 depth: 1
The bottom box has:
width: 10 height: 100 depth: 1
Both together should look like
-----------
-
-
-
-
Now I have the Problem, that i don't know how to calcultate the right Translation for both:
Top Box:
d3dDevice.Transform.World = Matrix.Translation(0, 20, 30.0f);
Bottom Box:
d3dDevice.Transform.World = Matrix.Translation(195, -40, 30.0f);
Now the bottom Box isn't direct among the top box.
I think that I must calculate Z but I don't know how i do this. Can someone help me?