Navigation
Unreal Engine C++ API Reference > Runtime > Engine > Kismet > UKismetMathLibrary
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 |
static FVector VectorSpringInterp
&40;
FVector Current,
FVector Target,
FVectorSpringState & SpringState,
float Stiffness,
float CriticalDampingFactor,
float DeltaTime,
float Mass,
float TargetVelocityAmount,
bool bClamp,
FVector MinValue,
FVector MaxValue,
bool bInitializeFromTarget
&41;
Remarks
Uses a simple spring model to interpolate a vector from Current to Target.
Parameters
Name | 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) |
DeltaTime | Time difference since the last update |
Mass | Multiplier that acts like mass on a spring |
TargetVelocityAmount | If 1 then the target velocity will be calculated and used, which results following the target more closely/without lag. Values down to zero (recommended when using this to smooth data) will progressively disable this effect. |
bClamp | Whether to use the Min/Max values to clamp the motion |
MinValue | Clamps the minimum output value and cancels the velocity if it reaches this limit |
MaxValue | Clamps the maximum output value and cancels the velocity if it reaches this limit |
bInitializeFromTarget | If set then the current value will be set from the target on the first update |