UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
BlueprintSpringMathLibrary.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3#pragma once
4
6
7#include "BlueprintSpringMathLibrary.generated.h"
8
9UCLASS(MinimalAPI, Experimental, meta=(BlueprintThreadSafe))
11{
13
14public:
15 // Simple Spring //
16
17 UE_EXPERIMENTAL(5.7, "SpringMath is experimental")
26 UFUNCTION(BlueprintCallable, meta=(Category="Math|Spring|Experimental"))
27 static ENGINE_API void CriticalSpringDampFloat(UPARAM(ref) float& InOutX, UPARAM(ref) float& InOutV, const float& TargetX, float DeltaTime, float SmoothingTime = 0.2f);
28
29 UE_EXPERIMENTAL(5.7, "SpringMath is experimental")
38 UFUNCTION(BlueprintCallable, meta = (Category = "Math|Spring|Experimental"))
39 static ENGINE_API void CriticalSpringDampAngle(UPARAM(ref) float& InOutAngle, UPARAM(ref) float& InOutAngularVelocity, const float& TargetAngle, float DeltaTime, float SmoothingTime = 0.2f);
40
41 UE_EXPERIMENTAL(5.7, "SpringMath is experimental")
50 UFUNCTION(BlueprintCallable, meta=(Category="Math|Spring|Experimental"))
51 static ENGINE_API void CriticalSpringDampVector(UPARAM(ref) FVector& InOutX, UPARAM(ref) FVector& InOutV, const FVector& TargetX, float DeltaTime, float SmoothingTime = 0.2f);
52
53 UE_EXPERIMENTAL(5.7, "SpringMath is experimental")
62 UFUNCTION(BlueprintCallable, meta=(Category="Math|Spring|Experimental"))
63 static ENGINE_API void CriticalSpringDampVector2D(UPARAM(ref) FVector2D& InOutX, UPARAM(ref) FVector2D& InOutV, const FVector2D& TargetX, float DeltaTime, float SmoothingTime = 0.2f);
64
65 UE_EXPERIMENTAL(5.7, "SpringMath is experimental")
74 UFUNCTION(BlueprintCallable, meta=(Category="Math|Spring|Experimental"))
75 static ENGINE_API void CriticalSpringDampQuat(UPARAM(ref) FQuat& InOutRotation, UPARAM(ref) FVector& InOutAngularVelocity, const FQuat& TargetRotation, float DeltaTime, float SmoothingTime = 0.2f);
76
77 UE_EXPERIMENTAL(5.7, "SpringMath is experimental")
86 UFUNCTION(BlueprintCallable, meta=(Category="Math|Spring|Experimental"))
87 static ENGINE_API void CriticalSpringDampRotator(UPARAM(ref) FRotator& InOutRotation, UPARAM(ref) FVector& InOutAngularVelocity, const FRotator& TargetRotation, float DeltaTime, float SmoothingTime = 0.2f);
88
89 UE_EXPERIMENTAL(5.7, "SpringMath is experimental")
101 UFUNCTION(BlueprintCallable, meta=(Category="Math|Spring|Experimental"))
102 static ENGINE_API void VelocitySpringDampFloat(UPARAM(ref) float& InOutX, UPARAM(ref) float& InOutV, UPARAM(ref) float& InOutVi, float TargetX, float MaxSpeed, float DeltaTime, float SmoothingTime = 0.2f);
103
104 UE_EXPERIMENTAL(5.7, "SpringMath is experimental")
116 UFUNCTION(BlueprintCallable, meta=(Category="Math|Spring|Experimental"))
117 static ENGINE_API void VelocitySpringDampVector(UPARAM(ref) FVector& InOutX, UPARAM(ref) FVector& InOutV, UPARAM(ref) FVector& InOutVi, const FVector& TargetX, float MaxSpeed, float DeltaTime, float SmoothingTime = 0.2f);
118
119 UE_EXPERIMENTAL(5.7, "SpringMath is experimental")
131 UFUNCTION(BlueprintCallable, meta=(Category="Math|Spring|Experimental"))
132 static ENGINE_API void VelocitySpringDampVector2D(UPARAM(ref) FVector2D& InOutX, UPARAM(ref) FVector2D& InOutV, UPARAM(ref) FVector2D& InOutVi, const FVector2D& TargetX, float MaxSpeed, float DeltaTime, float SmoothingTime = 0.2f);
133
134 // Damper //
135
136 UE_EXPERIMENTAL(5.7, "SpringMath is experimental")
146 UFUNCTION(BlueprintPure, meta=(Category="Math|Spring|Experimental"))
147 static ENGINE_API float DampFloat(float Value, float Target, float DeltaTime, float SmoothingTime = 0.2f);
148
149 UE_EXPERIMENTAL(5.7, "SpringMath is experimental")
159 UFUNCTION(BlueprintPure, meta = (Category = "Math|Spring|Experimental"))
160 static ENGINE_API float DampAngle(float Angle, float TargetAngle, float DeltaTime, float SmoothingTime = 0.2f);
161
162 UE_EXPERIMENTAL(5.7, "SpringMath is experimental")
172 UFUNCTION(BlueprintPure, meta=(Category="Math|Spring|Experimental"))
173 static ENGINE_API FVector DampVector(const FVector& Value, const FVector& Target, float DeltaTime, float SmoothingTime = 0.2f);
174
175 UE_EXPERIMENTAL(5.7, "SpringMath is experimental")
185 UFUNCTION(BlueprintPure, meta=(Category="Math|Spring|Experimental"))
186 static ENGINE_API FVector2D DampVector2D(const FVector2D& Value, const FVector2D& Target, float DeltaTime, float SmoothingTime = 0.2f);
187
188 UE_EXPERIMENTAL(5.7, "SpringMath is experimental")
198 UFUNCTION(BlueprintPure, meta=(Category="Math|Spring|Experimental"))
199 static ENGINE_API FQuat DampQuat(const FQuat& Rotation, const FQuat& TargetRotation, float DeltaTime, float SmoothingTime = 0.2f);
200
201 UE_EXPERIMENTAL(5.7, "SpringMath is experimental")
211 UFUNCTION(BlueprintPure, meta=(Category="Math|Spring|Experimental"))
212 static ENGINE_API FRotator DampRotator(const FRotator& Rotation, const FRotator& TargetRotation, float DeltaTime, float SmoothingTime = 0.2f);
213
214 UE_EXPERIMENTAL(5.7, "SpringMath is experimental")
224 UFUNCTION(BlueprintCallable, meta=(Category="Math|Spring|Experimental"))
225 static ENGINE_API void SpringCharacterUpdate(UPARAM(ref) FVector& InOutPosition, UPARAM(ref) FVector& InOutVelocity, UPARAM(ref) FVector& InOutAcceleration, const FVector& TargetVelocity, float DeltaTime, float SmoothingTime = 0.2f);
226
227 UE_EXPERIMENTAL(5.7, "SpringMath is experimental")
241 UFUNCTION(BlueprintCallable, meta=(Category="Math|Spring|Experimental"))
242 static ENGINE_API void VelocitySpringCharacterUpdate(UPARAM(ref) FVector& InOutPosition, UPARAM(ref) FVector& InOutVelocity, UPARAM(ref) FVector& InOutVelocityIntermediate, UPARAM(ref) FVector& InOutAcceleration, const FVector& TargetVelocity, float DeltaTime, float SmoothingTime = 0.2f, float MaxAcceleration = 1.0f);
243
244 // Conversion Methods
245
251 UFUNCTION(BlueprintPure, meta=(Category="Math|Spring|Experimental"))
252 static ENGINE_API float ConvertSmoothingTimeToStrength(float SmoothingTime);
253
259 UFUNCTION(BlueprintPure, meta=(Category="Math|Spring|Experimental"))
260 static ENGINE_API float ConvertStrengthToSmoothingTime(float Strength);
261
267 UFUNCTION(BlueprintPure, meta=(Category="Math|Spring|Experimental"))
268 static ENGINE_API float ConvertHalfLifeToSmoothingTime(float HalfLife);
269
275 UFUNCTION(BlueprintPure, meta=(Category="Math|Spring|Experimental"))
276 static ENGINE_API float ConvertSmoothingTimeToHalfLife(float SmoothingTime);
277};
#define UE_EXPERIMENTAL(Version, Message)
Definition CoreMiscDefines.h:369
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
#define UPARAM(...)
Definition ObjectMacros.h:748
#define GENERATED_BODY(...)
Definition ObjectMacros.h:765
#define UFUNCTION(...)
Definition ObjectMacros.h:745
#define UCLASS(...)
Definition ObjectMacros.h:776
Definition BlueprintFunctionLibrary.h:16
Definition BlueprintSpringMathLibrary.h:11
Definition RobinHoodHashTable.h:18