Resetting time...
I'm trying to animate milkshape3D models, and I've bumped into a little problem.
The animation wotks just fine, and everything looks like it should, but the problem is resetting the time to the begining of the animation. I'm using the performance timer... It should really be very simple to do, and I've tried it but it just didn't seem to work! It's very strange. It seems to be resetting the time to zero, anyway! I don't think it is necessary to post the code, or explain how I'm doing it, I'm just hoping someone has done this before, and can help me.
So if anyone has done this, or has any idea, or anything at all, please help me..
Thank you!
[edited by - James Trotter on April 13, 2003 4:50:55 AM]
Have you tried recording the Time at the beginning of the animation. and then when it is done resetting it to tht time again.
Out - The Prox
Out - The Prox
NARF - Pinky and the Brain
Thank you for responding!
Anyway, I don''t think I was explaining well at all, sorry.
But there is one variable that holds the time of day when the timer started: timer->performance_timer_start.
And every time I wish to get the time that has elapsed I:
Get the current time with QueryPerformanceCounter()
and return:
current_time - performance_timer_start
To reset the timer to zero I have to set the performance_timer_start to the current time.
*---------------(---------)
* is performance_timer_start
( is the beginning of the animation
) is the end of the animation
I could easily reset it to zero, when the animation has been played, by setting the performance_timer_start to the current time, which would be at the end of the animation, when I restart it... But how would I reset it to the beginning of the animation?
I hope this was easy enough to understand, and not too confusing, please help!
Thank you!
Anyway, I don''t think I was explaining well at all, sorry.
But there is one variable that holds the time of day when the timer started: timer->performance_timer_start.
And every time I wish to get the time that has elapsed I:
Get the current time with QueryPerformanceCounter()
and return:
current_time - performance_timer_start
To reset the timer to zero I have to set the performance_timer_start to the current time.
*---------------(---------)
* is performance_timer_start
( is the beginning of the animation
) is the end of the animation
I could easily reset it to zero, when the animation has been played, by setting the performance_timer_start to the current time, which would be at the end of the animation, when I restart it... But how would I reset it to the beginning of the animation?
I hope this was easy enough to understand, and not too confusing, please help!
Thank you!
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement