How to get a value from a runtime float curve (structure)?


how can I get a float value from a runtime float curve?

Thank you,


Like this:

This is not a “runtime float curve”. It’s a special curve which can be edited in the default value:

Haven’t worked with these. I think the vehicle movement component uses them, not sure if this functionality is directly exposed to blueprints, though.

Unfortunately, you cannot evaluate FRuntimeFloatCurves (or the FRuntimeVectorCurve) in blueprints as of now since the function is not exposed.
If you are able to use C++ however, you can make yourself a function library which exposes them, this is how you evaluate a Runtime Float Curve


/** Evaluates the value of a Runtime Float Curve using the given time. */
UFUNCTION(BlueprintPure, Category = "Math|RuntimeFloatCurve")
	static float GetRuntimeFloatCurveValue(const FRuntimeFloatCurve& InCurve, float InTime);


float UMyFunctionLibrary::GetRuntimeFloatCurveValue(const FRuntimeFloatCurve& InCurve, float InTime)
	// Evaluate the curve
	return InCurve.GetRichCurveConst()->Eval(InTime);

In Blueprints
Screenshot 2022-09-10 100958


Nonsense that such common functionality is not included in the engine

Thanks, this worked!