Sign in to follow this  
JoystickX

More animations at one time

Recommended Posts

We use X models and ID3DXAnimationController interface to control animations. How to use one animation to animate bone(s) X and another animation to animate bone(s) Y at same time? Problem is that animation A affects bones from animation B. Although A by itself not move with B-bones, when A and B play together bones moves are jerky. Thanks for answers

Share this post


Link to post
Share on other sites
First of all , make sure you export animation data only for the bones (X or Y) you want to animate in the certain track(look in the exported .x file in the animation set you exported,keep only the animation data of the X or Y bones).Then use animation blending to blend between the two tracks.Something like this:



LPD3DXANIMATIONSET anim1;
LPD3DXANIMATIONSET anim2;

m_animController->GetAnimationSet(0,&anim1);
m_animController->GetAnimationSet(1,&anim2);

m_animController->SetTrackAnimationSet(0,anim1);
m_animController->SetTrackAnimationSet(1,anim2);

m_animController->SetTrackEnable(0,true);
m_animController->SetTrackEnable(1,true);

m_animController->SetTrackSpeed(0,1.0f);
m_animController->SetTrackSpeed(1,1.0f);

m_animController->SetTrackWeight(0,1.0f);
m_animController->SetTrackWeight(1,1.0f);

m_animController->SetPriorityBlend(D3DXPRIORITY_HIGH);



Hope this helps...

Share this post


Link to post
Share on other sites

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