# Any kind of interpolation inside of a function?

**URL:** <https://forums.unrealengine.com/t/any-kind-of-interpolation-inside-of-a-function/227106>\
**Category:** Blueprint\
**Tags:** unreal-engine\
**Created:** [April 29, 2021, 3:33pm UTC](https://forums.unrealengine.com/t/any-kind-of-interpolation-inside-of-a-function/227106 "2021-04-29T15:33:19Z")\
**Posts on this page:** 1\
**Showing post:** 11

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [April 30, 2021, 12:23pm UTC](https://forums.unrealengine.com/t/any-kind-of-interpolation-inside-of-a-function/227106/11 "2021-04-30T12:23:52Z")

</div>

> [@Pavelioso](#):
>
> With the UMG animations it’s not possible either - cannot take out float value, and Timelines cannot be created inside of UMG.

Think of the UMG animation as of 0-1 value over time, an alpha. You cannot pipe in the data into the animation but you can read its current time and sample against an external curve. And animation speed is adjustable. Example:

> **[Topics tagged unreal-engine](https://forums.unrealengine.com/tags/intersection/unreal-engine/question)**
>
> Topics tagged unreal-engine

Scroll down to the image with a curve - plenty of fine control. Quite usable with MDIs.

Here’s another auxiliary method:

> [@Can you animate a dynamic material parameter in UMG widget timeline?](https://forums.unrealengine.com/t/can-you-animate-a-dynamic-material-parameter-in-umg-widget-timeline/151529/2):
>
> You could add Trigger / Repeater events to the timeline: From here on, you can use the Sequencer Graph to push what you need into the material instance.

This allows you to fire off events during UMG animations.

When you combine both, you actually have a timeline inside UMG that allows you to load external curves. Once set up (in a Data Table), it becomes quite versatile. The upfront work is considerable, as with everything moderately complex.

I can’t speak for iTween, looks crafty AF.

For another approach to reusable, modular interpolation for any actor (not umg):

Create an actor component that interpolates necessary values for its owner (you can’t have a timeline in an actor component but it will Tick), the component removes itself once it’s done. This way those effects only exist where they are needed. The only thing you need to do is to Add Component with the desired interpolation data.

Or, or, or wait for @JaredTherriault to blow our minds with his answer 😉

---

_[View the full topic](https://forums.unrealengine.com/t/any-kind-of-interpolation-inside-of-a-function/227106)._
