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"

FMath::FInterpTo() Not Implemented?

Hi everyone, I was looking for a function that I could use in Tick to interpolate a float like character health from its current value to its maximum value. Looking at the API documentation in 4.6 it seemed like FMath::FInterpTo could be a good candidate to use. In my project (4.6.1) I was not able to get this function to work though.

I tried to use the visual studio feature to view this functions definition, and instead it goes to the functions declaration, it doesn't seem as if it has a defined definition.

 UnrealMathUtility.h
 
 /** Interpolate float from Current to Target. Scaled by distance to Target, so it has a strong start speed and ease out. */
     static CORE_API float FInterpTo( float Current, float Target, float DeltaTime, float InterpSpeed );

When I tried to see other math functions that were used in the ShooterGame example, for instance FMath::Lerp() the function seems to display correctly and is also defined in the UnrealMathUtility.h.

My questions are: (1) Should I be having this problem? I am using downloaded library builds of the engine, not github source. (2) Is there another way to accomplish the changing the value of a float over time using existing math functions that I may not be seeing?

Product Version: Not Selected
Tags:
more ▼

asked Dec 21 '14 at 03:47 AM in C++ Programming

avatar image

ra_ar
51 5 9 12

avatar image ra_ar Dec 21 '14 at 01:01 PM

Update, I tried the test differently and this function seems to be working unless there is something I don't understand with the way the building process works. Earlier I basically created a custom function that was similar to the FInterptTo (source listed in the API) and it too was working.

I would still like to know why visual studio didn't take me to the function definition. My current guess is that it has to do with the function already being compiled. When I searched the engine folder I found the associated UnrealMathUtility.h file, but did not find "Runtime/Core/Private/Math/UnrealMath.cpp"

avatar image BaderThanBad Dec 21 '14 at 01:20 PM

You cannot view source code unless you have the github source. If you want to look up any of the source code you can search the documentation here in the API. For instance, this is the Finterpto code. Happy hunting.

avatar image ra_ar Dec 21 '14 at 04:20 PM

Thank you BaderThanBad.

(comments are locked)
10|2000 characters needed characters left

1 answer: sort voted first

Not a problem, please mark as closed.

more ▼

answered Dec 21 '14 at 04:21 PM

avatar image

ra_ar
51 5 9 12

(comments are locked)
10|2000 characters needed characters left
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