Original Post
I just finished (re)implementing skinned meshes to work with DirectX 9.0c and added the ability to control the speed at which the animations play. Here's what I'm doing to get the time I'm at in the animation: Animation.time += (timeGetTime() - LastTime) * Animation.speed; Animation.time = Animation.time - ((int)(Animation.time / (AnimationLength + 1)) * (AnimationLength + 1)); Where LastTime is a static variable saved from the last frame's timeGetTime call. This way the time goes up but then wraps (loops) around whenever AnimationLength is reached. The problem is that the precision errors are off by a LOT. After just a couple seconds (albeit a couple hundred frames per second) the animations are already quite far off and only get worse. I just changed from storing time as a double instead of a float but it's still pretty bad. How should I remedy this? Is there some better way of making the animation loop around? Thanks for any advice, ms