1
Graphics / Re: more beginner graphics questions
« on: March 21, 2013, 07:26:32 pm »
How are you currently handling animation frames ?
What i'd do is have an "update" function in the different objects and pass it the time elapsed since last frame. You can then update the time on your animation with this elapsed time.
Basically in the animation system i developed, i have different times for each animation frame and i change the frames based on the time elapsed. So if you want to have an object autoswitching between animation and idle pose, you could use a loop boolean (which means the animation will restart if it has reached last frame and must change frame) and set the first frame as the "idle" frame with a time of 4 seconds.
I just looked at Foalys Animation Class and it's pretty similar (a bit simpler but still) to what i do. Hence you should be able to do this by adding a time var for each frame and use this to switch your frames instead of a time for all the frames.
(not sure if i'm clear ^^)
What i'd do is have an "update" function in the different objects and pass it the time elapsed since last frame. You can then update the time on your animation with this elapsed time.
Basically in the animation system i developed, i have different times for each animation frame and i change the frames based on the time elapsed. So if you want to have an object autoswitching between animation and idle pose, you could use a loop boolean (which means the animation will restart if it has reached last frame and must change frame) and set the first frame as the "idle" frame with a time of 4 seconds.
I just looked at Foalys Animation Class and it's pretty similar (a bit simpler but still) to what i do. Hence you should be able to do this by adding a time var for each frame and use this to switch your frames instead of a time for all the frames.
(not sure if i'm clear ^^)