Panning and zooming slow
Panning and zooming a huge scene on a galaxy s22 mobile (Unity) is slow. Panning and zooming is done by setting a timeline via a blend node at runtime. Is there any way to make this faster? If not, please add transform optimizations to the Rive runtime.
I can help you with optimization techniques, but I need a little more info. How big is the scene? Am I understanding correctly that you're determining the scroll position in Unity, passing a value to Rive, and using that value to set your blend value? Could you post a video showing this in action?
The scene is very big: 175 state machine layers, 526 timelines, Thousands of objects, and a lot of listeners and inputs. You get the idea. Most timelines are not running all the time. Indeed I determine the scroll position in Unity and pass the value to Rive using a blend state. Panning is very smooth in the Rive editor, so it should be possible. Note that in the video, panning is smooth because it runs on a fast laptop. But on an Android it's laggy.
Here is a video:
I've seen earlier versions of this one and it looks awesome! When working giant, scrollable artboards, I use a lot of solos to make sure that things that aren't currently visible on screen aren't being rendered. This is a lot more performant than just clipping the artboard or setting the opacity to 0. Here's one way to do it:
Oh that's interesting. I will try that out. I still wonder why there is a performance difference with panning using a timeline vs just using the touch pad or mouse to pan around in Rive itself. When navigating the "camera" in Rive, it is super performant. There must be a way to get the same speed when using a timeline. Could there be an optimization gem in there for the Rive team?