• Create Account

### #Actualiedoc

Posted 07 May 2012 - 07:13 AM

not sure if you've tried this, but you will also have to add the y component of the "forward" vector to the things position. I only added the x and z above. so you need to do this:

tankPosX += speed * vecTankForward.x;

tankPosY += speed * vecTankForward.y;

tankPosZ += speed * vecTankForward.z;

D3DXMatrixTranslation(&matPos, tankPosX, tankPosY, tankPosZ);

### #1iedoc

Posted 07 May 2012 - 07:13 AM

not sure if you've tried this, but you will also have to add the y component of the "forward" vector to the things position. I only added the x and z above. so you need to do this:

tankPosX += speed * vecTankForward.x;

tankPosY += speed * vecTankForward.y;

tankPosZ += speed * vecTankForward.z;

D3DXMatrixTranslation(&matPos, tankPosX, tankPosY, tankPosZ);

PARTNERS