Thank you for yourt time. Unfortunately, this possibly works with FRichCurve, but not with the version that allows editing from the Editor (FRuntimeFloatCurve):
FKeyHandle h1, h2, h3;
h1 = CustomStepHeightCurve.EditorCurveData.AddKey(0.f, 0.f, true);
h2 = CustomStepHeightCurve.EditorCurveData.AddKey(0.5f, 1.f, true);
h2 = CustomStepHeightCurve.EditorCurveData.AddKey(1.f, 0.f, true);
// make a copy
auto HeightKeys = CustomStepHeightCurve.EditorCurveData.Keys;
HeightKeys[0].ArriveTangent = 2.8878f;
HeightKeys[0].LeaveTangent = 2.8878f;
HeightKeys[0].InterpMode = ERichCurveInterpMode::RCIM_Cubic;
HeightKeys[0].TangentMode = ERichCurveTangentMode::RCTM_Auto;
HeightKeys[1].ArriveTangent = 0.f;
HeightKeys[1].LeaveTangent = 0.f;
HeightKeys[1].InterpMode = ERichCurveInterpMode::RCIM_Cubic;
HeightKeys[1].TangentMode = ERichCurveTangentMode::RCTM_Auto;
HeightKeys[2].ArriveTangent = -2.8878f;
HeightKeys[2].LeaveTangent = -2.8878f;
HeightKeys[2].InterpMode = ERichCurveInterpMode::RCIM_Cubic;
HeightKeys[2].TangentMode = ERichCurveTangentMode::RCTM_Auto;
// save in curve
CustomStepHeightCurve.EditorCurveData.SetKeys(HeightKeys);
This results in an empty curve:

Also, if you don’t define the handlers ahead of time you get some other tangent issues.