Skip to main content
GameDev.net gamedev.net
🔒 Locked

Animation Controller Blues

Started by Supernat02 Nov 28, 2003 at 1:14 AM 2 replies 300+ views
Original Post
Supernat02
Supernat02
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
Chris ByersMicrosoft DirectX MVP - 2005
treething
treething
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?
Supernat02
Supernat02
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
Chris ByersMicrosoft DirectX MVP - 2005
treething
treething
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.


Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.