• Advertisement
Sign in to follow this  

Failed to attach objects

This topic is 2289 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

if (m_pCombineFrameMatrix != NULL) {
// Get Object Space of attached object
D3DXMatrixInverse(&mat2, NULL, m_pCombineFrameMatrix);


// Transform it to world
D3DXMatrixMultiply(&mat3, &mat2, &m_matWorld);
m_matWorld = mat3;

The output is a bit wield. It is huge and gone to mysterious places.
Any ideas that could help me out with this?

Share this post

Link to post
Share on other sites
Shall I assume you are asking about parenting an object under another object?
The forklift should be the parent of the crate?

Each object should have two types of transforms: local and world. When you update the transform on any given object, you are always updating its local.
At the end of each frame, world transforms need to be generated by having each object send its world transform down to its children.
Children create their world transforms by multiplying first by their own local transforms, then by the world transform given to them by their parents.

If you want to check if this is an art problem, set the transform of the crate to a specific place and see if it actually is at that place as you expect. Or open the source file for the art in Maya or 3D Studio Max (or whatever).

L. Spiro

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement