Sign in to follow this  
JeremyCAFE

When an X File Animation Set is at its end?

Recommended Posts

JeremyCAFE    100
How do I figure out when an animation set is at the end? I try to use the following code to figure out the position, but the animation skips over the end values at time and loops. void SkinnedMesh::playAnimation(LPD3DXANIMATIONCONTROLLER animeCon) { animeCon->GetAnimationSet(m_nNextAnimation, &animation); animeCon->SetTrackAnimationSet(m_dwCurrentTrack, animation); animeCon->GetTrackDesc( m_dwCurrentTrack, & td ); } double SkinnedMesh::GetAnimationPercent(void) { return animation->GetPeriodicPosition(td.Position) / animation->GetPeriod(); } How can I tell when the animation is over so I can change the current animation to the next?

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