How do I place 2 connected models
I have my 2 meshes (just simple blocks) and I want them to be connected (so i eventually have a chessboard), but i cant figure out how to position them so they are right next to each other.
Im using the D3DX library functions to place them at the moment (which is the reason the question is in the direct x forum because I think that will affect what I have to do), the 1st one I "translate" to 0,0,0 but what do i need to translate the 2nd one to, to get put it at, say, the right hand side of the first block. I know it has to be x,0,0 where x is a positive number but I dont know what number x needs to be.
Thanks for any help you can offer.
Because where''s the fun in that? hehe nah I''m just messing around at the moment really, just learning the ropes if you will, and i thought it would teach me more to have a number of meshes connected rather than just one big mesh. Also my 3d modelling skills are basically non-existant and i dont know how to make a big chessboard with black and white squares on it.
the x your looking for is the size of the block, use trial and error or open the .x file in notepad and try to find the right number
If its designed around the center, then you need to make X = Block_Size_in_Units/2. If its designed around one of the corners, it just needs to be X=BlockSize
______________________________
Quantum
CEO of Quantum Rebound Software
Website Up Soon
______________________________
Quantum
CEO of Quantum Rebound Software
Website Up Soon
You could also use the ComputeBoundingBox function to get the relative coordinates of the edges.
If they''re just boxes, why are you using meshes anyways? That''s just overcomplicating things.
The simplest thing to do would be to create a single block (36 vertices...just hard code it), and tile it over the scene.
Hell, you could even generate the whole board procedurally, if you really want.
The simplest thing to do would be to create a single block (36 vertices...just hard code it), and tile it over the scene.
Hell, you could even generate the whole board procedurally, if you really want.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement