• Advertisement

Archived

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

attaching objects to eachother

This topic is 5497 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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!

Share this post


Link to post
Share on other sites
Advertisement
Fixed the problem. I used the untranslated hand coordinates and updated to object space instead of world space. It''s working as intended now.

Share this post


Link to post
Share on other sites

  • Advertisement