Skip to main content
S
17d ago

Help with scroll interaction

Hey all,
I am trying to animate my timeline based on input from a scroll position, but timeline is not rendering as it should when I use blend state of empty timeline and timeline with the animation.

It's hard to see what exactly is wrong, but I think the top bezier vertices are not the same, shadows as well are not the same, etc.
Is there another way to play the timeline based on percentage input, or is that what I have to use blend states for?

Thanks.

UPDATE: I've just realized it's way easier/sensical to do this using animation playback at the runtime. Although I am still interested in what went wrong with the blend states?

1 reply
14d ago

I think that the easiest way to handle this would be with a joystick. Here's how I'd do it:

  1. Create a joystick and set it's X axis to "Timeline 1."

  2. Create 2 new timelines - one with the joystick all the way to the left, one with it all the way to the right.

  3. Create a blend state with the 2 new timelines that is controlled by the "progress" input. When you push play and change the input, the joystick should move and control Timeline 1.

Although I am still interested in what went wrong with the blend states?

There are 2 important things to understand about how blend states work:

Both timelines play at the same time and the input value determines how to blend the two timelines together. A common use case would be a blend state between run and walk looping timelines. Let's say that the Y position of the right foot at .5 seconds is 1 for the walk timeline and 3 for the run timeline. If the input is 50/100, every time the timelines are at .5 seconds, the Y position will be 2. In your case, your timeline doesn't loop so as you change the input, your initial state is blending with the final state of Timeline 1 and ignoring previous keyframes.

Does that make sense? I'm happy to record a quick video if that needs more clarification.