   Implementing First Person Camera with Gun
  Hello guys, currently I'm having problem when I wish to attach the gun together with my camera (what I mean is like a normal FPS game, the gun will always following the camera, perhaps on bottom-right)I have done the camera part, but I don't know how to attach the gun. What I have in my camera class:- a vector to store CURRENT POSITION.- a vector to store CURRENT UP VECTOR.- a vector to store CURRENT RIGHT VECTOR.- a vector to store CURRENT LOOK AT VECTOR.Anyone can help? With all the vectors above, how am I going to use it in order to implement the gun? Is there any website shows some good tutorial/explanation on this?Looking for reply.Thanks :)   
  Well, set the gun's position equal to the camera's position, plus some offset to position where you want relative to it, then use the camera's rotation matrix to orient the gun in the direction of the camera.   ;  what does the Camera Rotation Matrix meant to???I dunno which one is my camera rotation matrix >.<   ;  This will help it explain better than I have time to :)http://www.cubic.org/docs/camera.htmdiginerd   ;  I still cannot get it :(Anyone can help?What I've achieved was, the gun will follow the camera if the camera didn't rotate at all. Once it is rotated, then the gun will not rotate and stick with its own position.I'm always thinking, whether World Matrix for Gun has 3 vectors like UP,LOOK,RIGHT? I do not know how to make the gun always facing like the camera did.Please, looking for help :(   ;  Displace your weapon so that it will be at the desired location 'relative to the camera' then multiply its transform by the camera matrix, which should rotate it and translate it properly. If you still dont get it, show us some code.   ;  I've moved to desired location, but I think I'm having problem with rotation >.</* BUILD THE GUN MATRIX */D3DXMATRIX matOrientation;getViewMatrix(&matOrientation);D3DXVECTOR3 meshModify = D3DXVECTOR3( 4.0f, -6.5f, 10.0f);// Offset from camera positionD3DXVec3TransformNormal( &meshModify, &meshModify, &matOrientation );// NormalizemeshPosition = pos + meshModify; // Add to player's position// Create world matrix for gunD3DXMATRIX matMeshWorld; // build transformation D3DXMATRIX trans;getViewMatrix(&trans);trans._41 = meshPosition.x;trans._42 = meshPosition.y;trans._43 = meshPosition.z;trans._44 = 1;D3DXMatrixMultiply(&matMeshWorld, &rotation, &matMeshWorld);   drawGun();