Jump to content
  • Advertisement
Sign in to follow this  

Smooth animation in DirectX

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

I have read through a theme from a forum " Animation blending in DX9 ", but at me it has not turned out. Here a code. Help to correct it please. It would be necessary for me that one animation smoothly passed in another. void CModel::SetCurrentAnimation(DWORD dwAnimationFlag, DWORD PrevAnim) { m_dwCurrentAnimation = dwAnimationFlag; LPD3DXANIMATIONSET AnimSet = NULL; LPD3DXANIMATIONSET AnimSetPrev = NULL; m_pAnimController->GetAnimationSet(m_dwCurrentAnimation, &AnimSet); m_pAnimController->GetAnimationSet(PrevAnim, &AnimSetPrev); m_pAnimController->SetTrackAnimationSet(0, AnimSet); m_pAnimController->SetTrackAnimationSet(1, AnimSetPrev); m_pAnimController->SetTrackEnable(1,true); m_pAnimController->SetTrackEnable(0,true); m_pAnimController->SetTrackSpeed(0,1.0f); m_pAnimController->SetTrackSpeed(1,1.0f); m_pAnimController->SetTrackWeight(0,1.0f); m_pAnimController->SetTrackWeight(1,1.0f); //m_pAnimController->SetPriorityBlend(D3DXPRIORITY_HIGH); //m_pAnimController->SetTrackPosition( 0, 0 ); SAFE_RELEASE(AnimSet) } }

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!