Archived

This topic is now archived and is closed to further replies.

Zeke

How do I place 2 connected models

Recommended Posts

Zeke    122
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.

Share this post


Link to post
Share on other sites
Zeke    122
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.

Share this post


Link to post
Share on other sites
drdlord    122
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

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
Etnu    880
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.

Share this post


Link to post
Share on other sites
Zeke    122
Thanks for the replies guys, Ive decided to forget the meshes and code the board into an indexed vertex buffer.

Share this post


Link to post
Share on other sites