Flipbook: random frame

Hello there,
In my effect I would like a single particle to change to a random frame of the flipbook texture every given time.
I tried using the Set tex Index Random block, which is work, however if I put it in the particle update block it updates every frame. How can I choose a speed for changing the frame, by keeping it random at the same time?

Hi @kurai ,

You can do something like this:

The Seed value of the Random number operator determines what random number will be randomly generated, so if you increment this with time, you will periodically get a different random value.

In this case, every second the seed value will change (as it’s a uint, it will only increment in whole numbers), for the following result:

Hope this helps!


6920261--811754--Lzw4pALNIZ.gif

1 Like