UKismetMathLibrary::FloatSpringInterp

Uses a simple spring model to interpolate a float from Current to Target.

Windows
MacOS
Linux

References

Module

Engine

Header

/Engine/Source/Runtime/Engine/Classes/Kismet/KismetMathLibrary.h

Include

#include "Kismet/KismetMathLibrary.h"

Source

/Engine/Source/Runtime/Engine/Private/KismetMathLibrary.cpp

Syntax

static float FloatSpringInterp
(
    float Current,
    float Target,
    FFloatSpringState & SpringState,
    float Stiffness,
    float CriticalDampingFactor,
    float DeltaTime,
    float Mass
)

Remarks

Uses a simple spring model to interpolate a float from Current to Target.

Parameters

Parameter

Description

Current

Current value

Target

Target value

SpringState

Data related to spring model (velocity, error, etc..) - Create a unique variable per spring

Stiffness

How stiff the spring model is (more stiffness means more oscillation around the target value)

CriticalDampingFactor

How much damping to apply to the spring (0 means no damping, 1 means critically damped which means no oscillation)

Mass

Multiplier that acts like mass on a spring

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss