Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- D3DXMatrixRotationX(&matRotationX,0);
- D3DXMatrixRotationY(&matRotationY,D3DXToRadian(fmod(clientSession.getClientChar()->getOrientation() + 0.75f, 1.0f)* 360));
- D3DXVECTOR3 transVec;
- D3DXVECTOR3 unitVec = D3DXVECTOR3(0.0f, 0.0f, -3.0f);
- D3DXVec3TransformCoord(&transVec, &unitVec, &matRotationY);
- D3DXMatrixTranslation(&matTranslation,(vObjects[CHARACTER_OBJIDX]->getX() + transVec.x),(vObjects[CHARACTER_OBJIDX]->getY() + transVec.y),(vObjects[CHARACTER_OBJIDX]->getZ(), transVec.z));
- D3DXMATRIX matInverse,matTransInverse;
- D3DXMatrixInverse( &matInverse, NULL, &(matRotationX*matRotationY) );
- D3DXMatrixInverse( &matTransInverse, NULL, &(matTranslation) );
- clientWindow.GetDevice()->SetTransform(D3DTS_VIEW,&(matTransInverse * matInverse));
Add Comment
Please, Sign In to add comment