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


Objects coord-> World Coord

Recommended Posts

Cuchulainn    132
I ripped out the code out of the Meshes tutorial example and changed it. I am making a game and i want to be able to load all my objects from x files and position and orientate them at design time in my world. I mutated the mesh tutorial code so that i created an object class and had it so that you could have multiple objects displayed. I have an array of objects now that i can just type in the filename into their filename variable and they load. I did this b4 in VB and i managed to get them in a position and orientate them. I''m using VC++ now and i want to do the same thing. What i did in VB was i extracted all of the points out of all my meshes, make translation and rotation matrixes in correspondance with their location/orientation and concatenated the matrix''s and transformed every object vertex by them. This worked and i could position each object in my scene separately. Currently i can display as many objects as i want in my prg but they all are at 0,0,0 coordinates. I wanted to do the same thing in VC++ and things were a bit more complicated. It then hit me that there had to be an easier way using D3DX to do this - the transformation from local coordinates into world coordinates. All games do it - i must be missing out on something real simple. Could you please explain to me how this whole thing works.

Share this post

Link to post
Share on other sites