Jump to content
  • Advertisement

Archived

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

Scooter

Translation along the same dir as you're facing

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

I''m doing something like this to move a plane mesh around my world. But something''s not right, the translation part is not working at all. The rotation part works just fine so how do i get the mesh to move in the same direction it''s facing. D3DXVECTOR3 vTrans = mesh.vVelocity * mesh.fSpeed; D3DXVec3TransformNormal( &vTrans, &vTrans, &mesh.matLocal); mesh.vPosition += vTrans; D3DXQUATERNION qR; D3DXQuaternionRotationYawPitchRoll( &qR, mesh.fYaw, mesh.fPitch, mesh.fRoll); D3DXMatrixAffineTransformation( &mesh.matLocal, .25f, NULL, &qR, &mesh.vPosition); g_pd3dDevice->SetTransform( D3DTS_WORLD, &mesh.matLocal);

Share this post


Link to post
Share on other sites
Advertisement

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!