Does constantly played timeline may cause preformance issues?

I’m using timeline to update float value once over time when falling and to reverse it over time when walking. This works as intented for now, but I was wondering wheter constant (every frame) play and reverse call may cause preformance issues over time. Yea just let me know if this is a bad practice.


This is how this function look overall.

I don’t think this is the main concern here. Plus, it doesn’t actually function the way you think it does, because the TL is reset every time it’s triggered, so the TL doesn’t actually do anything there, nothing will change if you remove it. But maybe you want the movement to continue a little more after the input is over. In that case, you can use an enhanced input action, place a TL after it’s completed pin, and add movement input in the saved input vector’s direction (you’d create a variable for that). And still, you wouldn’t use the float track at all, because the movement component handles that.

The bad practice here is how you handle the movement.

If the the game is third person, you’d do it like this:

And if it’s top down, it’d be like this:

The IMC:

About falling, the character movement component already handles that. And you’d probably wanna use a character class for the player character unless you’re gonna go with some unusual movement mechanics. And considering you’re already using the Add Movement Input node, you already have a character class. Maybe pawn tho and you’re using the floating movement component.

If the reason you’re using a timeline here is to make the movement frame independent, don’t worry! The movement component again, already handles that. I guess there might be small differences between the usual framerates like 60, 120 or 240 where we’d observe consistent outcomes and extremely low framerates such as 20 or 15, but it’s really unnecessary to try to change that.

Hope this clears things up :innocent:

1 Like

Hi, thanks for the replay. It’s good to know that calling timeline will not cause many issues, this was my main concern. As for other things, this small node snippet here is just as example as actuall thing is a bit larger. The timeline is used to reduce movement input during fall. As for that EnhancedInputAction thing, I don’t think I have ever heard about it. I’m still using Unreal 4 and that IMC thing looks like Unreal 5 to me, so I might have meaby set wrong engine for my question. But still, thanks for the answer.

1 Like