Jump to content
  • Advertisement
Sign in to follow this  
repka3

Animation Event

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

Hi all, instaed of start an animation and then in every update check if
mAnimCtrl->GetTrackDesc( dwCastTrack, &td );
float period=pASTrackcast->GetPeriod();
if( td.Position >= period) //blend stop animation


Can I use more then one track event for the same track to start and stop? I mean when i call playanimation i do something like:
mAnimCtrl->KeyTrackEnable( m_dwCurrentTrack, FALSE, m_dTimeCurrent + MOVE_TRANSITION_TIME );
    mAnimCtrl->KeyTrackSpeed( m_dwCurrentTrack, 0.0f, m_dTimeCurrent, MOVE_TRANSITION_TIME, D3DXTRANSITION_LINEAR );
    mAnimCtrl->KeyTrackWeight( m_dwCurrentTrack, 0.0f, m_dTimeCurrent, MOVE_TRANSITION_TIME, D3DXTRANSITION_LINEAR );

    mAnimCtrl->SetTrackEnable( dwNewTrack, TRUE );
    mAnimCtrl->KeyTrackSpeed( dwNewTrack, 1.0f, m_dTimeCurrent, MOVE_TRANSITION_TIME, D3DXTRANSITION_LINEAR );
    mAnimCtrl->KeyTrackWeight( dwNewTrack, 1.0f, m_dTimeCurrent, MOVE_TRANSITION_TIME, D3DXTRANSITION_LINEAR );


It's common use to add also an event to stop newtrack with current_time+animation period for non looping animation? Or it's common use to check every update if is finished? Thx for your time.

Share this post


Link to post
Share on other sites
Advertisement
Sign in to follow this  

  • Advertisement
×

Important Information

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

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!