Sign in to follow this  

How to create a D3DXMatrix

This topic is 3042 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

well i was trying to translate my square but how would i do that?

for instance i have a class Car, and an mCar object of the class car. And i want to take input in and translate

for example

DXDMatrixTranslate(&mCar,x,y,z);

but how would i make it so that mCar is a matrix to traslate?

Share this post


Link to post
Share on other sites
I think that you're thinking about this the wrong way. A matrix is just used to store your position, rotation, and scaling values. In order to use that to translate your car object you need to multiply each vertex by that matrix. You can do this in directx by setting your world matrix to the matrix you've built using D3DXMatrixTranslation.

Share this post


Link to post
Share on other sites

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this