Archived

This topic is now archived and is closed to further replies.

Animation Controller Blues

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

Is it me, or is the Microsoft Animation Controller interface bugged? It says to call AdvanceTime(NumSecsPassed, Callback) every frame. My animation is 1 second long. I have to pass in the (frame_time/5000) instead of (frame_time/1000) for it to actually be at 1 second speed. Anyone else have this problem? Thanks, Chris

Share this post


Link to post
Share on other sites
I''ve had similar problems. It does seem that the animation controller is a little buggy. I have to do some crazy stuff to get my animations to play backwards.

Its possible though that the problem is with the exporter that produced your .x files in the first place. Have you tried other exporters?

Share this post


Link to post
Share on other sites
Nope, haven''t tried. But the thing is I typed in the key frame times myself. The exporter I used was truespace, and it exports in frames, instead of time...but I went in and changed it from 0 to 30 to 0 to 1000 manually. So the x file should be okay, I think.

To get it to play backwards (since the first 9.0 release''s animation controller was so poorly documented, it didn''t even say what the units were for GetTime and SetTime, so I just tried everything), I just multiply the time passed by 5000 instead of divide. Is that what you ended up doing?

Chris

Share this post


Link to post
Share on other sites
In the version I''m using (DX 9a?) there is no SetTime method, so to get it to play backwards I do this:


m_pAnimation->ResetTime();
m_pAnimation->AdvanceTime(0.0f,NULL);
m_pAnimation->AdvanceTime(mAnimationTime,NULL);


Its not that crazy I guess, but it took me a while to get the desired result. I have to divide by 100 to get the desired speed too, but I think thats the fault of the exporter. ID3DXAnimationSet::GetPeriod doesnt seem to work for me either, it just returns 0.

I dont really know what your problem could be though.


Share this post


Link to post
Share on other sites