Lack of Documentation on Timelines. Is there any other way of doing it?

After scouring the answer hub and forums, i haven’t found any tutorial that works on explaining on recreating timelines in C++.

Let say that i want to make a game like pac-man, that every half a second he moves 100 units. Instead of teleporting the SOAB i would like to make him move the full 100 each half second.

I only know how to do this in BP is using a timeline. If i were to use pure C++ how can i make that happen?

Here is pretty much my setup

static ConstructorHelpers::FObjectFinder<UCurveFloat> Curve(TEXT(“CurveFloat’/Game/Curves/MovementCurve.MovementCurve’”));
FOnTimelineFloat CurveFloatTrack{};
// this function will be called on timeline tick
CurveFloatTrack.BindUFunction(this, “UpdateSubPosition”);
// use the actual asset from the editor as timeline
FTimeline MovementUpdateTimeline = FTimeline{};
MovementUpdateTimeline.AddInterpFloat(Curve.Object, CurveFloatTrack, FName(TEXT(“curveTrack”)));

Ohh and a FYI it seems that my timeline is not accepting the length that i’m setting, he has a length of 0 and it running forever.

Some Blueprint nodes are very difficult to translate into C++.

I can’t help your specific question, but you can always make a blueprint Timeline, which then outputs the values back into C++.
Not the most elegant, but guaranteed to work.

I want to get the most performance from the game thread. Running something on tick from blueprints sounds bad to me.

I found this tutorial thanks to youtube. .

When i was learning blueprints it was easy to find tutorials now in C++ is looks that there is not enough content. I finally understand alot of anger that come from c++ programmers. Epic should give the same attention this was as well.

Thanks Orfeas for the tutorial.