Animation

Started by
0 comments, last by Buckeye 13 years, 4 months ago
I'm loading a animated .x mesh with D3DXLoadMeshHierarchyFromX, and I'm having trouble animating it. It animates too fast (its made to animate at 30 fps and my app runs at 500 fps), how do I make it animate at the speed it would if the program was running at 30 fps?

Plus, how do you loop between animation frames? I know there are animation sets, but my modeller doesn't support them (since the .x exporter is a 3rd party plugin) and it's really annoying to set animation sets manually in a text editor. I just want to be able to give my program two frames, and have it loop between them (10-15, 16-20, etc.) How would I do that?
Advertisement
Quote:how do I make it animate at the speed..

In your animController->AdvanceTime call, use a smaller delta-time = 30/500 times your 500 fps frame time. I think that's right. Try it.
Quote:it's really annoying to set animation sets manually in a text editor ... How would I (give my program two frames, and loop between them)?

You'll have to duplicate the function of the animation controller, as far as slerping and combining the frame data. You'll need to calculate all the frame data for the bones and their parent bones that you want to animate. I would think the time to code that would be much greater than editing the x-file, as you'll have to calculate the data for those two frames in any case.

Please don't PM me with questions. Post them in the forums for everyone's benefit, and I can embarrass myself publicly.

You don't forget how to play when you grow old; you grow old when you forget how to play.

This topic is closed to new replies.

Advertisement