How can i translate mesh with vector?

Started by
1 comment, last by MefistoManna 12 years ago
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 .
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.
Well. Now it' s working. Thanks.

This topic is closed to new replies.

Advertisement