Jump to content

  • Log In with Google      Sign In   
  • Create Account

We're offering banner ads on our site from just $5!

1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


How can i translate mesh with vector?


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
2 replies to this topic

#1 MefistoManna   Members   -  Reputation: 139

Like
0Likes
Like

Posted 20 April 2012 - 11:20 AM

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 Posted Image .

Sponsor:

#2 ChaseRLewis   Members   -  Reputation: 140

Like
0Likes
Like

Posted 21 April 2012 - 05:58 PM

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 Posted Image .


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.

#3 MefistoManna   Members   -  Reputation: 139

Like
0Likes
Like

Posted 22 April 2012 - 05:27 AM

Well. Now it' s working. Thanks.




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS