Archived

This topic is now archived and is closed to further replies.

Mazdak

Again Moving in the world(kind of math problem)

Recommended Posts

Mazdak    122
I want to move in my scence,I know I have to use GetTransform function for D3DTS_WORLd(Is that correcr?) and then use D3DXMatrixMultiply function to mutiple it to a transformation matrix and create a new matrix for new location. Now the problem is what value this trasformation matrix should have?(For example for moving to left or forward) How can I create this matrix? Thanks Mazy

Share this post


Link to post
Share on other sites
nlo    130
u dont need GetTransform, u need create a new matrix for SetTransform, that matrix is create like this:
1) make a rotation matrix
2) make a translation matrix
3) multiply them to a new matrix
4) transform the new matrix
5) if u need to render object, render now.

that''s all.

Share this post


Link to post
Share on other sites
Mazdak    122
quote:
Original post by nlo
u dont need GetTransform, u need create a new matrix for SetTransform, that matrix is create like this:
1) make a rotation matrix
2) make a translation matrix
3) multiply them to a new matrix
4) transform the new matrix
5) if u need to render object, render now.

that''s all.


Thanks for your reply. I don''t know somethings here. For aking a rotation and translation matrix, what value they should have, this is mostly my problem. And for item 4,what do you mean by transform the new matrix.

Sorry,I''m newbie to this field and my questions are kind of dumb questions.

Mazy

Share this post


Link to post
Share on other sites