<p>I have a terrain and i have tiny.x , what i would like todo is make tiny.x stay in view of the camera no matter if i rotate it with the mouse , this is the matrix so far
//these members are in the camera.h class
// Relative to world space.
D3DXVECTOR3 mPosW;
D3DXVECTOR3 mRightW;
D3DXVECTOR3 mUpW;
D3DXVECTOR3 mLookW;
fPos.x = gCamera->mPosW.x;
fPos.y = gCamera->mPosW.y - 0.05f;
fPos.z = gCamera->mPosW.z + 0.1f;
D3DXMatrixTranslation(&mWorldTrans,fPos.x,
fPos.y,
fPos.z);
HR(mFX->SetMatrix(mhWVP, &(mWorldScale*mWorldRotZ*mWorldTrans*gCamera->view()*gCamera->proj())));
No replies to this topic






