Sign in to follow this  
littlekid

Skin Mesh Tracks Animation

Recommended Posts

Here is my code for setting the Animation with the respective tracks
D3DXTRACK_DESC Desc;
Desc.Enable = true;
Desc.Speed = 1;
Desc.Weight = 0.0;
Desc.Position = 0;
Desc.Priority = D3DXPRIORITY_HIGH;

for (UINT n=0; n<AnimController->GetNumAnimationSets(); n++)
{
    AnimController->SetTrackDesc(n, &Desc);
    LPD3DXANIMATIONSET AnimationSet;
    AnimController->GetAnimationSet(n, &AnimationSet);
    AnimController->SetTrackAnimationSet(n, AnimationSet);
    SAFE_RELEASE(AnimationSet);
}

//To set the track's weight, for example to use track 2
Mesh.GetAnimController()->SetTrackWeight(2, 1.0f);
It can't run the animation that is place at track 2, i used the tiny_4anim.x model that come with the dec_sdk. Only track 0, and 1 seems to be able to work. am i doing anything wrongly?

Share this post


Link to post
Share on other sites
The AnimationController created by DirectX when you load the tiny_4anim.x file only supports a max of 2 animation tracks. You can play one at a time or blend a max of 2 at a time. So, to play more than two, you need to reassign track 0 or 1 to the other animation sets.

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