UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
ClothConfig_Legacy.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2#pragma once
3
5
6#include "ClothConfig_Legacy.generated.h"
7
13UENUM()
15{
16 // Use legacy wind mode, where accelerations are modified directly by the simulation
17 // with no regard for drag or lift
18 Legacy,
19
20 // Use updated wind calculation for NvCloth based solved taking into account
21 // drag and lift, this will require those properties to be correctly set in
22 // the clothing configuration
24};
25
31USTRUCT()
33{
35
37 : Stiffness(1.0f)
38 , StiffnessMultiplier(1.0f)
39 , StretchLimit(1.0f)
40 , CompressionLimit(1.0f)
41 {}
42
43 // How stiff this constraint is, this affects how closely it will follow the desired position
44 UPROPERTY()
45 float Stiffness;
46
47 // A multiplier affecting the above value
48 UPROPERTY()
49 float StiffnessMultiplier;
50
51 // The hard limit on how far this constraint can stretch
52 UPROPERTY()
53 float StretchLimit;
54
55 // The hard limit on how far this constraint can compress
56 UPROPERTY()
57 float CompressionLimit;
58};
59
65USTRUCT()
67{
69
72 , SelfCollisionRadius(0.0f)
73 , SelfCollisionStiffness(0.0f)
74 , SelfCollisionCullScale(1.0f)
75 , Damping(0.4f)
76 , Friction(0.1f)
77 , WindDragCoefficient(0.02f/100.0f)
78 , WindLiftCoefficient(0.02f/100.0f)
79 , LinearDrag(0.2f)
80 , AngularDrag(0.2f)
81 , LinearInertiaScale(1.0f)
82 , AngularInertiaScale(1.0f)
83 , CentrifugalInertiaScale(1.0f)
84 , SolverFrequency(120.0f)
85 , StiffnessFrequency(100.0f)
86 , GravityScale(1.0f)
87 , GravityOverride(FVector::ZeroVector)
88 , bUseGravityOverride(false)
89 , TetherStiffness(1.0f)
90 , TetherLimit(1.0f)
91 , CollisionThickness(1.0f)
92 , AnimDriveSpringStiffness(1.0f)
93 , AnimDriveDamperStiffness(1.0f)
94 {}
95
96 // How wind should be processed, Accurate uses drag and lift to make the cloth react differently, legacy applies similar forces to all clothing without drag and lift (similar to APEX)
97 UPROPERTY()
99
100 // Constraint data for vertical constraints
101 UPROPERTY()
102 FClothConstraintSetup_Legacy VerticalConstraintConfig;
103
104 // Constraint data for horizontal constraints
105 UPROPERTY()
106 FClothConstraintSetup_Legacy HorizontalConstraintConfig;
107
108 // Constraint data for bend constraints
109 UPROPERTY()
110 FClothConstraintSetup_Legacy BendConstraintConfig;
111
112 // Constraint data for shear constraints
113 UPROPERTY()
114 FClothConstraintSetup_Legacy ShearConstraintConfig;
115
116 // Size of self collision spheres centered on each vert
117 UPROPERTY()
118 float SelfCollisionRadius;
119
120 // Stiffness of the spring force that will resolve self collisions
121 UPROPERTY()
122 float SelfCollisionStiffness;
123
124 UPROPERTY()
125 float SelfCollisionCullScale;
126
127 // Damping of particle motion per-axis
128 UPROPERTY()
129 FVector Damping;
130
131 // Friction of the surface when colliding
132 UPROPERTY()
133 float Friction;
134
135 // Drag coefficient for wind calculations, higher values mean wind has more lateral effect on cloth
136 UPROPERTY()
137 float WindDragCoefficient;
138
139 // Lift coefficient for wind calculations, higher values make cloth rise easier in wind
140 UPROPERTY()
141 float WindLiftCoefficient;
142
143 // Drag applied to linear particle movement per-axis
144 UPROPERTY()
145 FVector LinearDrag;
146
147 // Drag applied to angular particle movement, higher values should limit material bending (per-axis)
148 UPROPERTY()
149 FVector AngularDrag;
150
151 // Scale for linear particle inertia, how much movement should translate to linear motion (per-axis)
152 UPROPERTY()
153 FVector LinearInertiaScale;
154
155 // Scale for angular particle inertia, how much movement should translate to angular motion (per-axis)
156 UPROPERTY()
157 FVector AngularInertiaScale;
158
159 // Scale for centrifugal particle inertia, how much movement should translate to angular motion (per-axis)
160 UPROPERTY()
161 FVector CentrifugalInertiaScale;
162
163 // Frequency of the position solver, lower values will lead to stretchier, bouncier cloth
164 UPROPERTY()
165 float SolverFrequency;
166
167 // Frequency for stiffness calculations, lower values will degrade stiffness of constraints
168 UPROPERTY()
169 float StiffnessFrequency;
170
171 // Scale of gravity effect on particles
172 UPROPERTY()
173 float GravityScale;
174
175 // Direct gravity override value
176 UPROPERTY()
177 FVector GravityOverride;
178
179 // Use gravity override value vs gravity scale
180 UPROPERTY()
181 bool bUseGravityOverride;
182
183 // Scale for stiffness of particle tethers between each other
184 UPROPERTY()
185 float TetherStiffness;
186
187 // Scale for the limit of particle tethers (how far they can separate)
188 UPROPERTY()
189 float TetherLimit;
190
191 // 'Thickness' of the simulated cloth, used to adjust collisions
192 UPROPERTY()
193 float CollisionThickness;
194
195 // Default spring stiffness for anim drive if an anim drive is in use
196 UPROPERTY()
197 float AnimDriveSpringStiffness;
198
199 // Default damper stiffness for anim drive if an anim drive is in use
200 UPROPERTY()
201 float AnimDriveDamperStiffness;
202};
EClothingWindMethod_Legacy
Definition ClothConfig_Legacy.h:15
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
#define UPROPERTY(...)
UObject definition macros.
Definition ObjectMacros.h:744
#define GENERATED_BODY(...)
Definition ObjectMacros.h:765
#define UENUM(...)
Definition ObjectMacros.h:749
#define USTRUCT(...)
Definition ObjectMacros.h:746
USkinnedMeshComponent float
Definition SkinnedMeshComponent.h:60
uint8_t uint8
Definition binka_ue_file_header.h:8
@ false
Definition radaudio_common.h:23
Definition ClothConfig_Legacy.h:67
Definition ClothConfig_Legacy.h:33