Hey guys. I’m working on an in-game audio player for audio logs. I got the system set up so that it plays and stops the audio perfectly using an audio component. However I just cannot wrap my head around how to calculate the elapsed time so I can show that in the widget. (I’m using 3D widgets for the player)
I also am trying to figure out how to convert the elapsed time into a progress bar.
I have everything set up pretty much and have exposed the text and set up the progress bar. I’m just stuck at how to convert it. I can get the audio file’s duration I’m just unsure what else I need. I’m sure it’s pretty straight forward but I’m simply not experienced enough yet and I need a nudge in the right direction.
Off the top of my head I’d imagine you could have a boolean variable that is set to true once an audio file begins playing. While this variable is true, you could start to increment a float variable every tick by delta time. I think you can take it from there to move the values over to your widget
I figured out the progress bar issue. I added a timer and I took the elapsed time and divided that with the audio’s duration and hooked that up to the progress bar’s float. Works perfectly.
Hi, i know it has been a long time, but how did you exactly fif this, could you show the blueprint? i am in the same situation and having some problems^^