Navigation
API > API/Runtime > API/Runtime/ClothingSystemRuntimeInterface
If a clothing simulation is able to be interacted with at runtime then a derived interactor should be created, and at least the basic API implemented for that simulation. Only write to the simulation and context during the call to Sync, as that is guaranteed to be a safe place to access this data.
| Name | UClothingSimulationInteractor |
| Type | class |
| Header File | /Engine/Source/Runtime/ClothingSystemRuntimeInterface/Public/ClothingSimulationInteractor.h |
| Include Path | #include "ClothingSimulationInteractor.h" |
Syntax
UCLASS (Abstract, BlueprintType, MinimalAPI)
class UClothingSimulationInteractor : public UObject
Inheritance Hierarchy
- UObjectBase → UObjectBaseUtility → UObject → UClothingSimulationInteractor
Derived Classes
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| ClothingInteractors | TMap< FName, TObjectPtr< UClothingInteractor > > | Cloth interactors currently created. | ClothingSimulationInteractor.h |
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| LastNumCloths | int32 | Simulation infos updated during the sync. | ClothingSimulationInteractor.h | |
| LastNumDynamicParticles | int32 | ClothingSimulationInteractor.h | ||
| LastNumIterations | int32 | ClothingSimulationInteractor.h | ||
| LastNumKinematicParticles | int32 | ClothingSimulationInteractor.h | ||
| LastNumSubsteps | int32 | ClothingSimulationInteractor.h | ||
| LastSimulationTime | float | ClothingSimulationInteractor.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void ClothConfigUpdated() |
Called to update the cloth config without restarting the simulation. | ClothingSimulationInteractor.h |
|
virtual void CreateClothingInteractor
(
const UClothingAssetBase* ClothingAsset, |
Create a cloth specific interactor. | ClothingSimulationInteractor.h | |
void DestroyClothingInteractors() |
Destroy all interactors. | ClothingSimulationInteractor.h | |
virtual void DisableGravityOverride() |
Disable any currently set gravity override. | ClothingSimulationInteractor.h |
|
virtual void EnableGravityOverride
(
const FVector& InVector |
Set a new gravity override and enable the override. | ClothingSimulationInteractor.h |
|
UClothingInteractor * GetClothingInteractor
(
const FString& ClothingAssetName |
ClothingSimulationInteractor.h | ||
UClothingInteractor * GetClothingInteractor
(
const FName ClothingAssetName |
Return a cloth interactor for this simulation. | ClothingSimulationInteractor.h |
|
int32 GetNumCloths() |
Return the number of cloths run by the simulation. | ClothingSimulationInteractor.h |
|
int32 GetNumDynamicParticles() |
Return the number of dynamic (simulated) particles. | ClothingSimulationInteractor.h |
|
int32 GetNumIterations () |
Return the solver number of iterations. | ClothingSimulationInteractor.h |
|
int32 GetNumKinematicParticles() |
Return the number of kinematic (animated) particles. | ClothingSimulationInteractor.h |
|
int32 GetNumSubsteps() |
Return the solver number of subdivisions./ This could be different from the number set if the simulation hasn't updated yet. | ClothingSimulationInteractor.h |
|
float GetSimulationTime() |
Return the instant average simulation time in ms. | ClothingSimulationInteractor.h |
|
virtual void PhysicsAssetUpdated() |
Called to update collision status without restarting the simulation. | ClothingSimulationInteractor.h |
|
virtual void SetAnimDriveSpringStiffness
(
float InStiffness |
Set the stiffness of the spring force for the animation drive. | ClothingSimulationInteractor.h |
|
virtual void SetMaxNumIterations
(
int32 MaxNumIterations |
Set the maximum number of solver iterations. | ClothingSimulationInteractor.h |
|
virtual void SetNumIterations
(
int32 NumIterations |
Set the number of time dependent solver iterations. | ClothingSimulationInteractor.h |
|
virtual void SetNumSubsteps
(
int32 NumSubsteps |
Set the number of substeps or subdivisions. | ClothingSimulationInteractor.h |
|
virtual void Sync
(
IClothingSimulationInterface* Simulation, |
Sync the interactor with the clothing simulation to use any changes made on the next simulate. | ClothingSimulationInteractor.h | |
virtual PRAGMA_DISABLE_DEPRECATION_WARNINGS void Sync
(
IClothingSimulation* Simulation, |
ClothingSimulationInteractor.h |
Protected
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual UClothingInteractor * CreateClothingInteractor () |
Create a clothing interactor. | ClothingSimulationInteractor.h |