Direct3D Help needed...Pleaseeeeeeeeeeeeee

Started by
0 comments, last by MetalWorX 23 years, 11 months ago
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!!
Raptor
Advertisement
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 ).

This topic is closed to new replies.

Advertisement