• Advertisement
Sign in to follow this  

How can i translate mesh with vector?

This topic is 2101 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 have already traslate a mesh with the function D3DXMatrixTranslation in a precise position of the 3D space. But how can i do to move the mesh in direction with a vector?
Sorry for my english smile.png .

Share this post


Link to post
Share on other sites
Advertisement

I have already traslate a mesh with the function D3DXMatrixTranslation in a precise position of the 3D space. But how can i do to move the mesh in direction with a vector?
Sorry for my english smile.png .


Easiest way is to keep a hold of the position you want is in a vector than when it comes time to actually do the transformation transform it into a matrix.

so in your game logic you can simply do position += velocity or something like that, but when your it comes time to render just do
D3DXMatrixTranslation and multiply the mesh by the matrix.

Share this post


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

  • Advertisement