How to interpolate the use of values in an array by time and not framerate?
Hello, I have an array whose values are called from the update exec pin on a timeline node, but it seems to me that this update is like a tick event and calls every frame. I want to use all of the values in my array by the end of my timeline meaning that when the frame rate is slower, I would need to interpolate between values in the array or call every 'nth' value so that I reach the end of the array. I would also need the end result to always be the same, so if I skip array element 4 and go straight to 5, on that frame, I would need to play (element 4 + element 5). I may be going about the entire system wrong, but I figure it's good to figure it out anyway. Everything is done in blueprints.
asked May 01 '17 at 06:09 PM in Blueprint Scripting
Thanks for replying Two-faced, but I'm not sure how a delay node would help my situation, I could have explained it better.
After fiddling with it a bit, I seem to have solved my issue, at least to a non-noticeable state.
I simply added an index driving floored float that is derived from dividing the optimal FPS by the current FPS and using that to play every "nth" array element, like so, tested at 10, 30, and 60 FPS and having my anim end in the same spot.
I also tested some nodes to add skipped array elements in the overall value per tick but I'm not sure if it's working or if it's a good idea. In my case, the lower the FPS, the larger my end result was and I wanted the end result to always be the same which the first pic seems to take care of. Nonetheless, I'll post my attempt, this is not the exact setup I had, but similar.
answered May 02 '17 at 10:40 PM
Maybe delay node is what you need?
answered May 01 '17 at 06:24 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here