Jump to content
  • Advertisement


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


Direct3D Help needed...Pleaseeeeeeeeeeeeee

This topic is 6928 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

How do i find the world coords of a particular object from its local matrix?? i have implemented the vector method for its movement. i say- vLoc.z+=2; for moving the object 2 unints in the ''z'' direction. but when i request for the x,y,z coords from the vetor i get the local coords. how do i find the world coords from the damn thing???? Please help thanx a lot!!

Share this post

Link to post
Share on other sites
When you refer to local matrix, are you refering to a matrix that will put it in the proper local space? For example: truespace files first save vertices with a 0,0,0 origin, then have a local matrix. Then they have the world matrix. (If I remember correctly, because it was over a version ago, but never the less).

Here is a good answer: You will need to have a World
matrix set up that will rotate/scale/etc. your object to a position is the ''Real World'' that you want your object to goto. After you multiply your local coordinates against it, you will have your world coordinates.

But then again, if your object is at 0,0,0 in the world, then editing the local origin should produce the same effects.

The bottom line is, world coordinates should be produced from a combination of unedited local coordinates and some calculations ( usually a world matrix ).

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!