UBlueprintSpringMathLibrary::ConvertSmoothingTimeToStrength
#include "Kismet/BlueprintSpringMathLibrary.h"
Access: public
Specifiers: staticBlueprintPure
Description
Converts a spring's smoothing time into its equivalent strength, which corresponds to the spring's undamped frequency in Hz. Use this when a downstream API or custom spring implementation expects a strength/frequency parameter instead of a smoothing time.
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.
- • Strength and smoothing time are inversely related — a SmoothingTime of 0 corresponds to effectively infinite strength (an instant snap), so guard against passing 0 if you plan to divide by the resulting strength.
Signature
static float ConvertSmoothingTimeToStrength(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
Convert a smoothing time to spring strength C++
float Strength = UBlueprintSpringMathLibrary::ConvertSmoothingTimeToStrength(0.2f);
// Strength now holds the equivalent undamped frequency in Hz See Also
Tags
Version History
Introduced in: 5.7
| Version | Status | Notes |
|---|---|---|
| 5.7 | experimental | SpringMath is experimental. |
Feedback
Was this helpful?