Archived

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

EagleWarrior

plz help me out with this problem

Recommended Posts

EagleWarrior    122
Hi all i know i been asking for help on the same dam problem over and over again but no one ever gave me a good explanation. Instead of writing my code again i zipped it so if u want to help me i will send u the file with everything on it in your email. The problem is with the rotations i traced the matrices and the axis i made theres a problem with the Matrix multiplacation.

Share this post


Link to post
Share on other sites
Smilediver    142
Didn''t you had the same problem as me? Well, i have solved mine here''s what i''ve done


  
D3DXMatrixTranslation(&pPlayer->matLocal, pPlayer->vPos.x, pPlayer->vPos.y, pPlayer->vPos.z);
D3DXMatrixLookAtLH(&matRot, &D3DXVECTOR3(0.0f, 0.0f, 0.0f), &pPlayer->vLook, &pPlayer->vUp);
D3DXMatrixInverse(&matRot, NULL, &matRot);
pPlayer->matLocal = matRot * pPlayer->matLocal;

Share this post


Link to post
Share on other sites