rive-app / rive-cpp

C++ runtime for Rive
MIT License
278 stars 42 forks source link

Add support to play multiple timelines at the same time #366

Open BitBarrel opened 7 months ago

BitBarrel commented 7 months ago

Currently, you can only play or pan (scrub) one timeline (not state machine) at a time. I need to play (or set the exact position) of multiple timelines simultaneously.

There might be conflicts if other timelines write to the same properties, but I will make sure only one timeline writes to the same properties.

I am aware this can be done using joysticks and blend modes, but that requires a lot of extra work in Rive (two extra timelines, one joystick, and set up a state machine blend mode for each animation, and I have many, many animations). It would be easier if I could just pan/scrub multiple timelines in code instead.