Animation speed seems to change? Need help
Blitz3D Forums/Blitz3D Programming/Animation speed seems to change? Need help
| ||
anyone know why my walking animation would seem to slow down and speed up for no reason? I use the animate command on a b3d file with a simple walking animation and it seems to speed the walking animation and slow it down randomly. Is this effected by fps, or some other issue? I would hope that the animation stuff would be based on time between updateworld calls. |
| ||
It will update one frame each time you call UpdateWorld. If you're using multiple UpdateWorlds for collision purposes, you should add a '0' parameter to all but one of them. This forces collisions only and won't update the animation. |
| ||
yup got it. I was a moron. Thanks. :) |
| ||
BTW you may also use delta-t as the parameter to make sure the animation runs with the same overall speed on machines with diffrent power/framerate. Something like: old_t=t t=millisecs() delta#=float(t-old_t)/16.67 updateworld(delta) You may have to initialize old_t before you start the main loop, eg: old_t=millisecs()-17 |