• Advertisement

Archived

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

Question about mesh position in the world matrix

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

Hi.. I''ve set my world''s matrix... To do this I''ve se three vector: Pos, AtLook, Up. But with 3 vector I can''t set the position of a mesh.. so if I do move a single mesh.... what can I do? Byezzzzzzz ^__^

Share this post


Link to post
Share on other sites
Advertisement
I think when you say ''pos,lookat,up'' you mean you have set your view matrix. Not the world matrix. To set your world matrix you should use functions,

D3DXMatrixRotation
D3DXMatrixTranslation
D3DXMatrixScaling

Those functions set up the world, then you setTransform with the world matrix, and render your mesh. Generally it would look something like this

-Set projection matrix (perspective/orthographic)
-Set view matrix (lookat/up/pos)
-set world matric (you mess around with this to move meshes)
-Render mesh.


:::: [ Triple Buffer V2.0 ] ::::

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Oh thanks very much

I''ve understand ... In sdk I''ve find these information.
But now I''ve another question

If I want move two meshes, I must setting 2 matrixs?
I don''t find this in SDK...

Thanks again..

Share this post


Link to post
Share on other sites

  • Advertisement