Random row for flipbook animation in Unreal

I made a sprite sheet that each rows has it’s own sequence


like this texture, it has 6 rows and I would like to randomly pick one of these rows. maybe using random seed in dynamic parameter.
is there any way I can achieve this? it is very same thing in Unity, using random row

5 Likes

Hey! If you’re using Niagara, you can do it by generating a random int between 0 and 5 that chooses a random row, like so:

An then in the Sub UVAnimation you can set up the start position to be the random row multiplied by 4 to select the correct start position of the 4x6 sprite sheet, and the end position to be that same number + 3 so it goes along the row, like so:

If you’re using a custom SubUV setup with dynamic parameters you can always apply the same logic to it, but it’s probably easier using the Sub UVAnim.

Maybe there’s an easier solution to it but that’s how I’d do it, hope it helps!

10 Likes

Thanks a lot! that helped me a ton:)

1 Like

This is super useful information! Appreciate it! :grin: