UMG How to animate a property from its current value

Hey everyone!

So I’m currently looking at UMG animations and have come across a problem that I would have thought would be relatively simple to solve.

I have a “Rollover” and “Rolloff” state on a UMG widget that both have animations attached to them (basically just scaling up/down the widget). I want to be able to trigger these animations seamlessly at any point.
So for example, half way through the rollover animation the user moves the mouse off the widget, triggering the rolloff animation. Currently, the rolloff animation will “pop” in as the starting keyframe is at the end of the rollover animation, which hasn’t finished yet.
Ideally I would just want the rolloff animation to start from the current scale value and animate to the chosen value in the sequencer.

TLDR: How do I have an animation track that will animate from the current value of that property to a value I set. Is this possible currently?

You could keep track of how far along your widget is (as fraction of maximum/minimum scale) and use the “Start At Time” input to ensure that the animation plays from the correct position.

Hey Clayton, thanks for your response!
That would work you’re right, however I want a way to be able to do this with any animateable properties for any number of custom widget. Using this method would involve a lot of work to keep track of all the properties that could be animatin, but it might be the way to go !

It’s a shame there isn’t an easier way of achieving this!

The default transform track type in Sequencer/Timeline is “Absolute”. This means that the object will snap to the position evaluated by Sequencer. If you hit the +Track section on the Transform Track you can use a “Relative” transform instead. Relative tracks can take the object’s current position into account instead of just snapping to the specified value.

The relative transform will need to be blended with an absolute section - I believe this video has the details on how to do it;

If you reverse the animation mid-animation it should go from it’s current position to the target without snapping.

1 Like

Hi, this looks like exactly what I need! I did stumble upon the relative and additive track modes but I couldn’t find any documentation of how they would work.
The video describes exactly my problem but doesn’t show in detail how they solved it / set up their sequencer, so I’ll just have to play around with the relative track and see how it works.

Could you describe in more detail about blending a relative section into an absolute section please?

1 Like

I am not sure which values you will need to put into which transform (perhaps 0 in the relative and your target position in the absolute?) but to blend them you just need to make the two sections and then click and drag one into the other and when you smash them together they should automatically do a crossfade blend.

You can’t see it in the gif due to cropping, but I right clicked on the transform section, went to properties and clicked the padlocks on the bounds start/end so that the default absolute section was no longer infinite.

295753-leouqcfkf7.gif

YES! It works, thank you so much! There’s still some popping when I quickly move my mouse on and off the border, but in general it’s way smoother and does animate from it’s current value.

Just for future reference for anyone else facing this problem:

  1. Create an absolute section and add a keyframe at the time / value you want to animate to.
  2. Create a relative section and drag it ontop to blend (like the gif above shows)
  3. Add a keyframe on the relative section at 0.00 with a value of 0
  4. Make sure the relative section starts at 0.00 (otherwise you’ll have some delay when playing your animation)

Thank you for the explanations, but I believe I still haven’t got it :slight_smile:
Could you please give more information on how exactly the hover-unhover animations look like and how do you start/stop/manipulate them?

1 Like