Jump to content
  • Advertisement
Sign in to follow this  
JoystickX

More animations at one time

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

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
Advertisement
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
Sign in to follow this  

  • Advertisement
×

Important Information

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

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!