Sign in to follow this  

Smooth animation in DirectX

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

This topic is 3314 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this