#troubles with sin(current_time)

9 messages · Page 1 of 1 (latest)

weary lake
#

soo this is the code which is causing this trouble and it may be due to current_time, the lerp is so if HP or Hunger gets close to 0 the jiggle animation increases, that part worked so i left the game for about 20-30m then came back and found the animation was speed up out of nowhere but only happened when the game isn't paused (maybe due to HP and Hunger always updating) but when the game is paused it jiggles normally (or so it seems)
idk if i should use a different timer for the jiggle animation, cuz, it looks not right :p

#

this is when i start the game again (how it shoul jiggle normally)
but still has a small difference when paused and when not

#

sorry if the videos are darker

visual glade
#

Can you show us your pause logic and part of your HUD code where the health bar actually gets updated? Must be something wrong there.
I copied your sinwave code and ran it on my machine - it works perfectly fine.

#

The game looks cool, btw. Hotline Miami with hunger

weary lake
#

There was no other thing interfering with how the jiggle animation updates rather than those lines of code i just shown, apparently it has to do with the current_time being too big over time

#

So i just switched to a different variable to handle the jiggle animation

#

It works fine with current_time but in the first minutes of the game since open, maybe my code was the problem, maybe the current_time

#

Anyway thanks!