x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

how to create timeline-like variable in cpp

how to create something like timeline node in the cpp, and the data can be tweak visually as a curve (liek tweak that visually in defaults tab - or something like that).... can anyone can tell me that. thx?

Product Version: Not Selected
Tags:
more ▼

asked Mar 31 '15 at 08:16 AM in C++ Programming

avatar image

mirsabayu
202 16 24 35

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

You could e.g. create a new CurveFloat from the Editor (in the Content Browser go Add New > Miscellaneous > Curve > CurveFloat) and add your function there. That way you can tweak it visually as you like.

In the constructor of your C++ class where you want to use that curve, you first need to get the asset you just created:

 static ConstructorHelpers::FObjectFinder<UCurveFloat> Curve(TEXT("CurveFloat'/Game/PathToAsset/MyCurve.MyCurve'"));
 FOnTimelineFloat CurveFloatTrack{};
 // this function will be called on timeline tick
 CurveFloatTrack.BindUFunction(this, "MyCurveProgress");
 // use the actual asset from the editor as timeline
 FTimeline MyTimeline = FTimeline{};
 MyTimeline.AddInterpFloat(Curve.Object, MyCurveProgress, FName(TEXT("curveTrack")));

Further you would need to start the timeline and implement your progress function which will be called every tick (which is like the Update output of the BP timeline node).

Have a look at FTimeline to see what is possible.

Hope this helps. If you have any questions, feel free to ask.

more ▼

answered Mar 31 '15 at 09:55 AM

avatar image

trutty
541 29 33 181

avatar image mirsabayu Mar 31 '15 at 10:11 AM

owh thx, i will try to implement that now jejeje

avatar image LuLima Feb 09 '16 at 07:03 PM

Has anyone got this working? Could you show us a project with eveything working?

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question