Jump to content
  • Advertisement
Sign in to follow this  
Sparhawk42

How to move a Mesh Direct3D?

This topic is 4846 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 would like to move a mesh (loaded from an .x-file) in my scene, is there any convenient routine for this, or need I to to manipulate the VertexBuffer of the mesh itself with a transformation matrix? I'am using DirectX 9 (June SDK). Thanks for the help. [Edited by - Sparhawk42 on August 7, 2005 6:59:09 AM]

Share this post


Link to post
Share on other sites
Advertisement
O.K. I had hopped that there would be some convenience routine, but than I'll have to code those routine in my own engine :-(

Share this post


Link to post
Share on other sites
You don't need to modify the mesh.

Just create a translation matrix using D3DXMatrixTranslation and set it to the device using SetTransform( D3DTSS_WORLD, &myMatrix );

All non-pretransformed vertices drawn afterwards will be affected by that matrix.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

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

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!