RealDocs

UBlueprintSpringMathLibrary::ConvertSmoothingTimeToHalfLife

function Engine Blueprint Since 5.7
#include "Kismet/BlueprintSpringMathLibrary.h"
Access: public Specifiers: staticBlueprintPure

Description

Converts a spring's smoothing time into its equivalent half life — how long it takes the value to close half the remaining distance to the target. This is the inverse of ConvertHalfLifeToSmoothingTime, useful for exposing a more intuitive tuning value in tools or UI.

Caveats & Gotchas

  • Not itself marked UE_EXPERIMENTAL, but it lives on an Experimental UCLASS (UBlueprintSpringMathLibrary) and only makes sense alongside the other spring/damping functions, which are experimental.
  • A SmoothingTime of 0 produces a half life of 0 (an instant snap to target); do not assume a linear relationship between the two values for tuning purposes.

Signature

static float ConvertSmoothingTimeToHalfLife(float SmoothingTime);

Parameters

Name Type Description Default
SmoothingTime float The smoothing time of the spring in seconds — the time by which the output lags the input when critically damped and the input changes at a constant rate.

Return Type

float

Example

Expose smoothing time as a half life in an editor widget C++
float DisplayedHalfLife = UBlueprintSpringMathLibrary::ConvertSmoothingTimeToHalfLife(SmoothingTime);
// Show DisplayedHalfLife in seconds to the designer instead of the raw SmoothingTime

Version History

Introduced in: 5.7

Version Status Notes
5.7 experimental SpringMath is experimental.

Feedback

Was this helpful?

Suggest an edit

Select a field above to begin editing.