UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
ChaosSolverConfiguration.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3#pragma once
4
6
7#include "ChaosSolverConfiguration.generated.h"
8
9UENUM()
19
20USTRUCT()
22{
24
26 UPROPERTY(EditAnywhere, Category = "SolverConfiguration|Destruction", meta = (ClampMin = "0"))
27 int32 PerAdvanceBreaksAllowed = TNumericLimits<int32>::Max();
28
30 UPROPERTY(EditAnywhere, Category = "SolverConfiguration|Destruction", meta = (ClampMin = "0"))
31 int32 PerAdvanceBreaksRescheduleLimit = TNumericLimits<int32>::Max();
32
34 UPROPERTY(EditAnywhere, Category = "SolverConfiguration|Destruction", meta = (ClampMin = "-1"))
35 int32 ClusteringParticleReleaseThrottlingMinCount = INDEX_NONE;
36
38 UPROPERTY(EditAnywhere, Category = "SolverConfiguration|Destruction", meta = (ClampMin = "-1"))
39 int32 ClusteringParticleReleaseThrottlingMaxCount = INDEX_NONE;
40
46 UPROPERTY(EditAnywhere, Category = "SolverConfiguration|Destruction", meta = (ClampMin = "-1"))
47 bool bOptimizeForRuntimeMemory = false;
48};
49
50USTRUCT()
52{
54
56
57 // Handle renamed properties
58 CHAOS_API void MoveRenamedPropertyValues();
59
60 // The number of position iterations to run during the constraint solver step
61 UPROPERTY(EditAnywhere, Category = "SolverConfiguration|Iterations", meta = (ClampMin = "0"))
62 int32 PositionIterations;
63
64 // The number of velocity iterations to run during the constraint solver step
65 UPROPERTY(EditAnywhere, Category = "SolverConfiguration|Iterations", meta = (ClampMin = "0"))
66 int32 VelocityIterations;
67
68 // The number of projection iterations to run during the constraint solver step
69 UPROPERTY(EditAnywhere, Category = "SolverConfiguration|Iterations", meta = (ClampMin = "0"))
70 int32 ProjectionIterations;
71
72
73 // A collision margin as a fraction of size used by some boxes and convex shapes to improve collision detection results.
74 // The core geometry of shapes that support a margin are reduced in size by the margin, and the margin
75 // is added back on during collision detection. The net result is a shape of the same size but with rounded corners.
76 UPROPERTY(EditAnywhere, Category = "SolverConfiguration|Collision", meta = (ClampMin = "0.0"))
77 float CollisionMarginFraction;
78
79 // An upper limit on the collision margin that will be subtracted from boxes and convex shapes. See CollisionMarginFraction
80 UPROPERTY(EditAnywhere, Category = "SolverConfiguration|Collision", meta = (ClampMin = "0.0"))
81 float CollisionMarginMax;
82
83 // During collision detection, if tweo shapes are at least this far apart we do not calculate their nearest features
84 // during the collision detection step.
85 UPROPERTY(EditAnywhere, Category = "SolverConfiguration|Collision", meta = (ClampMin = "0.0"))
86 float CollisionCullDistance;
87
88 // The maximum speed at which two bodies can be extracted from each other when they start a frame inter-penetrating. This can
89 // happen because they spawned on top of each other, or the solver failed to fully reolve collisions last frame. A value of
90 // zero means "no limit". A non-zero value can be used to prevent explosive behaviour when bodies start deeply penetrating.
91 // An alternative to using this approach is to increase the number of Velocity Iterations, which is more expensive but will
92 // ensure the bodies are depenetrated in a single frame without explosive behaviour.
93 UPROPERTY(EditAnywhere, Category = "SolverConfiguration|Collision", meta = (ClampMin = "0.0"))
94 float CollisionMaxPushOutVelocity;
95
96 // If two bodies start off in overlapping each other, they will depentrate at this speed when they wake.
97 // If set to a large value, initially-overlapping objects will tend to "explode" apart at a speed that depends on the
98 // overlap amount and the timestep (this is the original, previously untunable behaviour). If set to zero,
99 // initially-overlapping objects will remain stationary and go to sleep until acted on by some other object or force.
100 // A negative value (-1) disables the feature and is equivalent to infinity.
101 // This property can be overridden per Body (see FBodyInstance::MaxDepenetrationVelocity)
102 UPROPERTY(EditAnywhere, Category = "SolverConfiguration|Collision")
103 float CollisionInitialOverlapDepenetrationVelocity;
104
105 UPROPERTY(EditAnywhere, Category = "SolverConfiguration|Clustering")
106 float ClusterConnectionFactor;
107
108 UPROPERTY(EditAnywhere, Category = "SolverConfiguration|Clustering")
109 EClusterUnionMethod ClusterUnionConnectionType;
110
111 UPROPERTY(EditAnywhere, Category = "SolverConfiguration|Destruction")
113
114 UPROPERTY(EditAnywhere, Category = "SolverConfiguration|GeneratedData")
115 bool bGenerateCollisionData;
116
117 UPROPERTY(EditAnywhere, Category = "SolverConfiguration|GeneratedData", meta=(EditCondition=bGenerateCollisionData))
118 FSolverCollisionFilterSettings CollisionFilterSettings;
119
120 UPROPERTY(EditAnywhere, Category = "SolverConfiguration|GeneratedData")
121 bool bGenerateBreakData;
122
123 UPROPERTY(EditAnywhere, Category = "SolverConfiguration|GeneratedData", meta = (EditCondition = bGenerateBreakData))
124 FSolverBreakingFilterSettings BreakingFilterSettings;
125
126 UPROPERTY(EditAnywhere, Category = "SolverConfiguration|GeneratedData")
127 bool bGenerateTrailingData;
128
129 UPROPERTY(EditAnywhere, Category = "SolverConfiguration|GeneratedData", meta = (EditCondition = bGenerateTrailingData))
130 FSolverTrailingFilterSettings TrailingFilterSettings;
131
132private:
133
134 // Renamed to PositionIterations
135 UPROPERTY()
136 int32 Iterations_DEPRECATED;
137
138 // Renamed to VelocityIterations
139 UPROPERTY()
140 int32 PushOutIterations_DEPRECATED;
141
142 // No longer used
143 UPROPERTY()
144 bool bGenerateContactGraph_DEPRECATED;
145};
EClusterUnionMethod
Definition ChaosSolverConfiguration.h:11
@ BoundsOverlapFilteredDelaunayTriangulation
@ MinimalSpanningSubsetDelaunayTriangulation
@ PointImplicitAugmentedWithMinimalDelaunay
@ INDEX_NONE
Definition CoreMiscDefines.h:150
FPlatformTypes::int32 int32
A 32-bit signed integer.
Definition Platform.h:1125
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 UENUM(...)
Definition ObjectMacros.h:749
#define USTRUCT(...)
Definition ObjectMacros.h:746
uint8_t uint8
Definition binka_ue_file_header.h:8
@ false
Definition radaudio_common.h:23
Definition ChaosSolverConfiguration.h:52
Definition ChaosSolverConfiguration.h:22
Definition SolverEventFilters.h:73
Definition SolverEventFilters.h:43
Definition SolverEventFilters.h:14
Definition NumericLimits.h:41