attaching objects to eachother
Hi guys,
I''m trying to attach objects to a skinnedmesh. I don''t know if I''m missing something or if something else is wrong, but I can''t place the object correctly on the model (spear in hand).
So, first I place the model in the world. Then, I take the righthand matrix (pFrame->Matrix) of the model and add it to the spear matrix doing a matrixmultiply, like so:
D3DXMatrixMultiply(&m_Spear->Matrix, &m_Spear->Matrix, &pFrame->Matrix);
Next I take the object matrix and add that to my world matrix:
D3DXMatrixMultiply(&m_worldMat, &m_worldMat, &m_Spear->Matrix);
My model appears but the spear does not. If I change the hand matrix to the root frame matrix, then the spear does appear in the center of the model''s coordinate space.
Hope this makes sense to you guys. If anyone has any info on what I''m doing wrong/missing i''d appreciate it!
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement