Advertisement Jump to content
Sign in to follow this  
Sparhawk42

How to move a Mesh Direct3D?

This topic is 4916 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.

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!