Problems about FRuntimeFloatCurve UPROPERTY

anonymous_user_e577384b
Tue, 15 Oct 2019 03:47:30 +0000
Community & Industry Discussion

I create a UPROPERTY which type is FRuntimeFloatCurve.

I have three problems now:

1. How to make FRuntimeFloatCurve unmodifiable? I try this way but it still can edit in ue4 editor.

protected:
    UPROPERTY(AssetRegistrySearchable, VisibleAnywhere, Category = "Curve")
        FRuntimeFloatCurve Curve;

2. How to let the keys(points) be hidden? These keys(points) are too obvious for my curve.

3. I add these keys by “AddKey” function and the curve is smooth.

h0 = FKeyHandle();
Curve.EditorCurveData.AddKey(x0, y0, true, h0);
Curve.EditorCurveData.SetKeyTangentMode(h0, ERichCurveTangentMode::RCTM_User);
Curve.EditorCurveData.SetKeyInterpMode(h0, ERichCurveInterpMode::RCIM_Cubic);

But after I use “UpdateOrAddKey” function to update these keys, it has bad tangents.

Curve.EditorCurveData.UpdateOrAddKey(x0, y0, true, 0.1);

Does anyone knows how to fix these three problems?
Thanks.

2 posts - 2 participants