Sign in to follow this  
repka3

Animation Event

Recommended Posts

repka3    100
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

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