Jump to content
  • Advertisement
Sign in to follow this  

A Question on using multianim

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


D3DXMatrixRotationY( &mxWorld, -m_fFacing );
D3DXMatrixTranslation( &mx, m_vPos.x, m_vPos.y, m_vPos.z );
D3DXMatrixMultiply( &mxWorld, &mxWorld, &mx );
D3DXMatrixMultiply( &mxWorld, &m_mxOrientation, &mxWorld );
m_pAI->SetWorldTransform( &mxWorld );

I have sub in a custom model for tiny.x to replace it in the multianim sample of dx9.
My model's facing direction is towards me from the screen, just like tiny.x as usual.
But the final output of the program was the character "lying" and "floating" around on the floor. I then cut some code out

float fScale = 1.f / m_pMA->GetBoundingRadius() / 7.f;
D3DXMatrixScaling( &mx, fScale, fScale, fScale );
m_mxOrientation = mx;
// D3DXMatrixRotationX( &mx, -D3DX_PI / 2.0f );
// D3DXMatrixMultiply( &m_mxOrientation, &m_mxOrientation, &mx );
// D3DXMatrixRotationY( &mx, D3DX_PI / 2.0f );
// D3DXMatrixMultiply( &m_mxOrientation, &m_mxOrientation, &mx );

The model stood upright correctly, but the facing direction then became erratic.
About 180 degrees off-target. This is just an educated guess. I believe i shouldn't have commented out the code. But in fact it was "lying" around on the floor if I didn't do it.
What are the possibilities of this kind of error?

Share this post

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

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!