0
\$\begingroup\$

I have a flipbook material I created from a sprite sheet to add some fireworks to a game I'm working on. I have the material set up and it is showing the animation of the firework like it should. However the animation in the material always repeats forever in a loop. I added an image to a widget to display the flipbook animation in a widget blueprint. The animation is shown in the blueprint as expected. The problem I have is getting the animation to start only when I show the animation. Being that the animation in the flipbook material is always looping, every time I show the image to show the firework, it seems to always start in a random frame, rarely is that frame actually the first frame. I read that I can control the speed of the animation in the flipbook. How can I stop the flipbook animation from looping indefinitely and only start the animation once I show the widget containing the image used to show the flipbook animation?

enter image description here

\$\endgroup\$
1
\$\begingroup\$

Add a Time node and Multiply node. Take the Time node and pass it as an input to the Multiply, add a float parameter as the other input on the multiply node then plug the output of the multiply into your AnimationPhase input on the flipbook node (the top input). Now at runtime you can set the float parameter to 0 to stop the animation, or 1 to play it (or 2 to play at double speed etc)

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.