Module |
|
Header |
/Engine/Source/Runtime/Engine/Classes/Kismet/KismetMathLibrary.h |
Include |
#include "Kismet/KismetMathLibrary.h" |
Source |
/Engine/Source/Runtime/Engine/Private/KismetMathLibrary.cpp |
static FVector VectorSpringInterp
(
FVector Current,
FVector Target,
FVectorSpringState & SpringState,
float Stiffness,
float CriticalDampingFactor,
float DeltaTime,
float Mass
)
Uses a simple spring model to interpolate a vector from Current to Target.
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 |