Playing Normal Animation Speed inside Game Loop
Blitz3D Forums/Blitz3D Programming/Playing Normal Animation Speed inside Game Loop
| ||
Hey guys, I got a bit of a problem with my animation speeds. It seems that when I play a sequence, the speed is faster when the fps is higher even though I set it like this: Animate robot,1,1 ;<-- default animation speed How can I play it with normal speed as what is stored in the animation model/file which is normally 30fps? |
| ||
Depending on the number of frames calculated and displayed per second, (maximum 60 with flip(1)), the speed of the turns, moves, animations will be different... A way to prevent this : http://www.blitzbasic.com/codearcs/codearcs.php?code=2916 |
| ||
Thanks RemiD, I will look into that source. |
| ||
UpdateWorld can take a parameter to adjust animation speed. Based on deltatime like in the example posted by RemiD it works very well. |
| ||
This is the solution I always used for this: Translated from a classic game development article: http://gafferongames.com/game-physics/fix-your-timestep/ |
| ||
Thanks Yasha. I will check this out asap and hopefully it solves my timing problem. |
| ||
@Flanker Yes, looks like UpdateWorld is also one option that will work. Thanks. |