How can I smooth count down progress bar?
I'm trying to create a countdown progress bar which starts at 1 and finishes at 0.
I've figured out how to get the seconds and minutes and I'm passing this through the HUD widget and doing a simple match to covert it between 0 and 1. I've also got this working a progress bar which goes down in line with the time left. However, the issues I'm having is that when the time goes down (second by second) the progress bar's movement reflect the seconds, so its quite jagged. Is it possible to have a smooth transition between the seconds.
Below is the blueprint of the HUG function which binds the time to the progress bar.
One way I thought of was to bring in milliseconds? but I'm unsure if this is the right way.
Disclaimer, I'm a beginner :)
Thank you :)
asked Oct 20 '17 at 07:48 AM in Blueprint Scripting
You can try to convert your time to a float. Let's say you want a Countdown of 5 seconds. Your starting float is 100. Let's assume that we have a Framerate of 60. Then you Need to substract 100/300 seconds are 0.333 every Frame. I know this is only a quick test. But i am not on my Computer, so i can't try it for myself. But you can try this. Of Course if you have another framerate you Need to multiply with Delta seconds...if i am right.
answered Oct 20 '17 at 08:05 AM
it looks like my time system was convoluted. I found a simpler solution by using the 'set timer' functionality:
Thanks for your help anyway.
answered Oct 20 '17 at 11:58 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here