Well yeah, I guess the Question stands for itself. Cant find any documentation on it. I basically just want to rotate and object over time, controlled by a timeline in C++. Is this possible?
Hey -
If you open Visual Studios for your project you can do a search for “timeline” three files that would help with what you’re looking for are the K2Node_Timeline.h & .cpp as well as Timeline.cpp. These are the sections that control creating a timeline in blueprints and you should be able to use it for your project. Another option is to go into blueprints and set up your timeline there.
Hhey ,
did you get it to work?
my attempts to:
const ConstructorHelpers::FObjectFinder<UCurveFloat> Curve(TEXT("CurveFloat'/Game/OwnStuff/EffectCurve.EffectCurve'"));
TimeLine = FTimeline{};
FOnTimelineFloat progressFunction{};
progressFunction.BindUFunction(this, "EffectProgress");
TimeLine.AddInterpFloat(Curve.Object, progressFunction);
AND
void AEffectBallSpeed::EffectProgress(float Value)
{
GEngine->AddOnScreenDebugMessage(-1, 5.f, FColor::Green, TEXT("EFFECT PROGRESS"));
}
don’t seem to work. maybe you can help
Nah sorry dint get it working. Did it in BP instead.
i got it working but the function is only called once.
hope it helps
As I commented in the post that you link to, timelines only run one time for each time it is called, and you appear to call it only in BeginPlay. If you’ve proven that the code works, you just need to add it to an event that is triggered multiple times if you want the timeline to repeat.
Cheers
Hey,
I had similar problems with timelines and finally managed to fix it.
Here is the link to the question/answer with code example: https://answers.unrealengine.com/questions/357144/what-is-the-proper-way-to-use-timelines-from-code.html