updateSprites(float deltaTime) does not respect deltaTime
-
All overloaded functions of
updateSprite()
seem to respectdeltaTime
as well asupdateSprites(array sprites, float deltaTime)
. However,updateSprites(float deltaTime)
does not respect thedeltaTime
parameter. Specifically, if I do:updateSprites(1/120) updateSprites(1/120)
between two
update()
running at 60fps, it will advance the sprite animation 1/30th of a second instead of 1/60th of a second. Doing the same with theupdateSprite()
function orupdateSprites(array sprites, float deltaTime)
will advance it correctly. It seems thatupdateSprites(float deltaTime)
ignores deltaTime and passes in its owndeltaTime
(maybe based on the internal clock difference between frames). -
Hi @SenteDescin, thanks for your report. I've looked into this and you are correct, the time parameter is not being used correctly in this case. It is indeed using the default delta time instead. A fix for this will be released in a future patch!
As you mentioned, it's possible to work around this for now by calling the list version of
updateSprites
or the singularupdateSprite
. I've verified that those use the supplied time parameter properly.updateSprites(my_sprite_list, speed) updateSprite(sprite, speed)
Thank you for the report!