Impossible to use TimelineComponent like you can use the Timeline Node

Setup:

I have a UTimelineComponent which I dynamically add a single UCurveFloat to in cpp (A Curve from a selection created by a designer, to be chosen from at Run Time, assigned to a name “Percentage_Complete”).

TimelineComponent->AddInterpFloat(Curve, OnTimelineFinishCallbackFunc, FName("Percentage_Complete"));

What I am trying to do:

I would, at run time, on a given event, play the Timeline. I would then like to take the value Percentage Complete and multiply it to figure out my position on a given Spline and apply that to the actor in the world. I don’t care if this happens in cpp or bp.

What I have tried:

I have tried using the cpp methodology but [I have run into issues which I am trying to solve][1].

I have a BlueprintImplementableEvent which should trigger the timeline, and then using the Percentage Complete value update the actor’s position along a spline. However it is currently impossible to do this via a TimelineComponent. If I were to use a Timeline (i.e. right click actor BP, add Timeline, it would work just fine).

Ultimately this should be possible in cpp which I am looking into, but I would consider it a bug/feature request that if you use a TimelineComponent in BP you can not assign a curve, or do things on update, or many other things that are incredibly useful which you can do if you manually add a (F)Timeline!

Hi vikhik,

After an initial look into this issue, it appears that this is not something that would be easily accomplished. If I am understanding your goal correctly, you want to be able to access the curve you are adding in code from within a Blueprint that is created from your code class? Unfortunately Timelines in Blueprints are not set up to work that way.

As you noticed, Timelines work primarily through the Timeline node, which only appears when you select Add Timeline from the context menu in an Event Graph. There is a great deal of work that is done “under the hood” of this node. Most of this functionality can be accessed through specific nodes for the timeline, but a custom curve added through code is not easily accessed. To retrieve data from the custom curve, you would need to either add a float property that is being updated in the code by the curve float, or write an accessor function to retrieve the value that you can call in the Blueprint when you need to know the current value of the curve float.

Hi ,

I guess another way to summarise this ‘bug’ would be to say that the Timeline Component is effectively useless in BP! It seems very odd to me that to use a Timeline in cpp I have to use the Timeline Component, and that it is the exact opposite when using BP.

It also means that you lose some power when using Timelines in BP, such as being able to have an abstract Timeline which you use on an actor, then to have a manager assign FloatCurves or WhateverCurves that you want to use.

Thanks,

Vikram.

Hi vikhik,

It certainly does seem to be a little counter-intuitive that the Timeline Component is apparently not very useful in Blueprints. I have submitted a feature request to ask that it’s usefulness in Blueprints be expanded (UE-19609). I did notice that if a UCurveFloat is set to be a UPROPERTY, then it can be set in the Details panel of the Blueprint. Since it seems like you are primarily using C++, would it be feasible for you to create a TArray of UCurveFloats? You could assign the necessary curves to the TArray in Blueprints, then retrieve the specific curve that you want to use from the Array in C++ during runtime.

Just to let you know, we do have some additional feature requests already in place that are somewhat similar. One is asking for the ability to assign a curve to a timeline in Blueprints during runtime (UE-13324), and another is asking for a way to access a specific curve in a timeline by its name (UE-2014).

Hi , it seems like those other feature requests are asking for the same thing, more functionality for timelines (and timeline components) in Blueprints. Glad to hear that I’m not alone!

Thanks for the follow up. Where can I view these feature requests? I’m looking at the github repo and am not sure where I should see them (if it’s there)

Hi vikhik,

Our bug tracking system is not currently publicly viewable. We are investigating the possibility of making it publicly viewable, but there is no time-frame on when that will happen (if at all). In the meantime, if you ever need an update on any of the tickets that I mentioned, just post another comment here and I will check on them for you.

Hi,

I was cracking my head for 3 days trying to do just that: assign an externally created Curve in my C++ timeline (via a UPROPERTY UCurveFloat) and then expose the output to BP for my designers to use.

From this question I guess it is not possible until those feature request are looked at. Any timeframe on that ?

Hi ,

I checked the status of the feature requests that I had mentioned, and they are all currently backlogged. They are all still open, which means that none of them have been turned down. However, the backlogged state generally indicates that it will be a while before any work is done on them.