• Advertisement


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

Objects coord-> World Coord

This topic is 5632 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

  • Advertisement