UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
UFieldSystemComponent Class Reference

‍** More...

#include <FieldSystemComponent.h>

+ Inheritance diagram for UFieldSystemComponent:

Public Member Functions

virtual bool HasAnySockets () const override
 
virtual FIELDSYSTEMENGINE_API FPrimitiveSceneProxyCreateSceneProxy () override
 
void SetFieldSystem (UFieldSystem *FieldSystemIn)
 
const UFieldSystemGetFieldSystem () const
 
FIELDSYSTEMENGINE_API void ApplyLinearForce (UPARAM(DisplayName="Enable Field") bool Enabled, UPARAM(DisplayName="Uniform Direction") FVector Direction, UPARAM(DisplayName="Field Magnitude") float Magnitude)
 
FIELDSYSTEMENGINE_API void ApplyStayDynamicField (UPARAM(DisplayName="Enable Field") bool Enabled, UPARAM(DisplayName="Center Position") FVector Position, UPARAM(DisplayName="Field Radius") float Radius)
 
FIELDSYSTEMENGINE_API void ApplyRadialForce (UPARAM(DisplayName="Enable Field") bool Enabled, UPARAM(DisplayName="Center Position") FVector Position, UPARAM(DisplayName="Field Magnitude") float Magnitude)
 
FIELDSYSTEMENGINE_API void ApplyRadialVectorFalloffForce (UPARAM(DisplayName="Enable Field") bool Enabled, UPARAM(DisplayName="Center Position") FVector Position, UPARAM(DisplayName="Falloff Radius") float Radius, UPARAM(DisplayName="Field Magnitude") float Magnitude)
 
FIELDSYSTEMENGINE_API void ApplyUniformVectorFalloffForce (UPARAM(DisplayName="Enable Field") bool Enabled, UPARAM(DisplayName="Center Position") FVector Position, UPARAM(DisplayName="Uniform Direction") FVector Direction, UPARAM(DisplayName="Falloff Radius") float Radius, UPARAM(DisplayName="Field Magnitude") float Magnitude)
 
FIELDSYSTEMENGINE_API void ApplyStrainField (UPARAM(DisplayName="Enable Field") bool Enabled, UPARAM(DisplayName="Center Position") FVector Position, UPARAM(DisplayName="Falloff Radius") float Radius, UPARAM(DisplayName="Field Magnitude") float Magnitude, UPARAM(DisplayName="Cluster Levels") int32 Iterations)
 
FIELDSYSTEMENGINE_API void ApplyPhysicsField (UPARAM(DisplayName="Enable Field") bool Enabled, UPARAM(DisplayName="Physics Type") EFieldPhysicsType Target, UPARAM(DisplayName="Meta Data") UFieldSystemMetaData *MetaData, UPARAM(DisplayName="Field Node") UFieldNodeBase *Field)
 
FIELDSYSTEMENGINE_API void AddPersistentField (UPARAM(DisplayName="Enable Field") bool Enabled, UPARAM(DisplayName="Physics Type") EFieldPhysicsType Target, UPARAM(DisplayName="Meta Data") UFieldSystemMetaData *MetaData, UPARAM(DisplayName="Field Node") UFieldNodeBase *Field)
 
FIELDSYSTEMENGINE_API void RemovePersistentFields ()
 
FIELDSYSTEMENGINE_API void AddFieldCommand (UPARAM(DisplayName="Enable Field") bool Enabled, UPARAM(DisplayName="Physics Type") EFieldPhysicsType Target, UPARAM(DisplayName="Meta Data") UFieldSystemMetaData *MetaData, UPARAM(DisplayName="Field Node") UFieldNodeBase *Field)
 
FIELDSYSTEMENGINE_API void ResetFieldSystem ()
 
const TArray< FFieldSystemCommand > & GetConstructionFields () const
 

Public Attributes

TObjectPtr< UFieldSystemFieldSystem
 
bool bIsWorldField
 
bool bIsChaosField
 
TArray< TSoftObjectPtr< AChaosSolverActor > > SupportedSolvers
 
FFieldObjectCommands ConstructionCommands
 
FFieldObjectCommands BufferCommands
 

Protected Member Functions

FIELDSYSTEMENGINE_API TSet< FPhysScene_Chaos * > GetPhysicsScenes () const
 
FIELDSYSTEMENGINE_API TArray< Chaos::FPhysicsSolverBase * > GetPhysicsSolvers () const
 
FIELDSYSTEMENGINE_API void BuildFieldCommand (bool Enabled, EFieldPhysicsType Target, UFieldSystemMetaData *MetaData, UFieldNodeBase *Field, const bool IsTransient)
 
FIELDSYSTEMENGINE_API void DispatchFieldCommand (const FFieldSystemCommand &InCommand, const bool IsTransient)
 
FIELDSYSTEMENGINE_API void ClearFieldCommands ()
 
virtual FIELDSYSTEMENGINE_API void OnCreatePhysicsState () override
 
virtual FIELDSYSTEMENGINE_API void OnDestroyPhysicsState () override
 
virtual FIELDSYSTEMENGINE_API bool ShouldCreatePhysicsState () const override
 
virtual FIELDSYSTEMENGINE_API bool HasValidPhysicsState () const override
 

Protected Attributes

FChaosSolversModuleChaosModule
 
bool bHasPhysicsState
 
TArray< FFieldSystemCommandSetupConstructionFields
 
TArray< FFieldSystemCommandChaosPersistentFields
 
TArray< FFieldSystemCommandWorldGPUPersistentFields
 
TArray< FFieldSystemCommandWorldCPUPersistentFields
 

Friends

class FFieldSystemEditorCommands
 

Detailed Description

‍**

FieldSystemComponent

Member Function Documentation

◆ AddFieldCommand()

void UFieldSystemComponent::AddFieldCommand ( UPARAM(DisplayName="Enable Field") bool  Enabled,
UPARAM(DisplayName="Physics Type") EFieldPhysicsType  Target,
UPARAM(DisplayName="Meta Data") UFieldSystemMetaData MetaData,
UPARAM(DisplayName="Field Node") UFieldNodeBase Field 
)

AddConstructionField This function will dispatch a command to the physics thread to apply a generic evaluation of a user defined field network. This command will be used in a construction script to setup some particles properties (anchors...). See documentation, for examples of how to recreate variations of the above generic fields using field networks

Parameters
EnabledIs this force enabled for evaluation.
TargetType of field supported by the solver.
MetaDataMeta data used to assist in evaluation
FieldBase evaluation node for the field network.

◆ AddPersistentField()

void UFieldSystemComponent::AddPersistentField ( UPARAM(DisplayName="Enable Field") bool  Enabled,
UPARAM(DisplayName="Physics Type") EFieldPhysicsType  Target,
UPARAM(DisplayName="Meta Data") UFieldSystemMetaData MetaData,
UPARAM(DisplayName="Field Node") UFieldNodeBase Field 
)

AddPersistentField This function will dispatch a command to the physics thread to apply a generic evaluation of a user defined field network. This command will be persistent in time and will live until the component is destroyed or until the RemovePersistenFields function is called. See documentation, for examples of how to recreate variations of the above generic fields using field networks

Parameters
EnabledIs this force enabled for evaluation.
TargetType of field supported by the solver.
MetaDataMeta data used to assist in evaluation
FieldBase evaluation node for the field network.

◆ ApplyLinearForce()

void UFieldSystemComponent::ApplyLinearForce ( UPARAM(DisplayName="Enable Field") bool  Enabled,
UPARAM(DisplayName="Uniform Direction") FVector  Direction,
UPARAM(DisplayName="Field Magnitude") float  Magnitude 
)

ApplyUniformForce This function will dispatch a command to the physics thread to apply a uniform linear force on each particle within the simulation.

Parameters
EnabledIs this force enabled for evaluation.
DirectionThe direction of the linear force
MagnitudeThe size of the linear force.

◆ ApplyPhysicsField()

void UFieldSystemComponent::ApplyPhysicsField ( UPARAM(DisplayName="Enable Field") bool  Enabled,
UPARAM(DisplayName="Physics Type") EFieldPhysicsType  Target,
UPARAM(DisplayName="Meta Data") UFieldSystemMetaData MetaData,
UPARAM(DisplayName="Field Node") UFieldNodeBase Field 
)

AddTransientField This function will dispatch a command to the physics thread to apply a generic evaluation of a user defined transient field network. See documentation, for examples of how to recreate variations of the above generic fields using field networks

Parameters
EnabledIs this force enabled for evaluation.
TargetType of field supported by the solver.
MetaDataMeta data used to assist in evaluation
FieldBase evaluation node for the field network.

◆ ApplyRadialForce()

void UFieldSystemComponent::ApplyRadialForce ( UPARAM(DisplayName="Enable Field") bool  Enabled,
UPARAM(DisplayName="Center Position") FVector  Position,
UPARAM(DisplayName="Field Magnitude") float  Magnitude 
)

ApplyRadialForce This function will dispatch a command to the physics thread to apply a linear force that points away from a position.

Parameters
EnabledIs this force enabled for evaluation.
PositionThe origin point of the force
MagnitudeThe size of the linear force.

◆ ApplyRadialVectorFalloffForce()

void UFieldSystemComponent::ApplyRadialVectorFalloffForce ( UPARAM(DisplayName="Enable Field") bool  Enabled,
UPARAM(DisplayName="Center Position") FVector  Position,
UPARAM(DisplayName="Falloff Radius") float  Radius,
UPARAM(DisplayName="Field Magnitude") float  Magnitude 
)

FalloffRadialForce This function will dispatch a command to the physics thread to apply a linear force from a position in space. The force vector is weaker as it moves away from the center.

Parameters
EnabledIs this force enabled for evaluation.
PositionThe origin point of the force
RadiusRadial influence from the position, positions further away are weaker.
MagnitudeThe size of the linear force.

◆ ApplyStayDynamicField()

void UFieldSystemComponent::ApplyStayDynamicField ( UPARAM(DisplayName="Enable Field") bool  Enabled,
UPARAM(DisplayName="Center Position") FVector  Position,
UPARAM(DisplayName="Field Radius") float  Radius 
)

SetDynamicState This function will dispatch a command to the physics thread to apply a kinematic to dynamic state change for the particles within the field.

Parameters
EnabledIs this force enabled for evaluation.
PositionThe location of the command
RadiusRadial influence from the position

◆ ApplyStrainField()

void UFieldSystemComponent::ApplyStrainField ( UPARAM(DisplayName="Enable Field") bool  Enabled,
UPARAM(DisplayName="Center Position") FVector  Position,
UPARAM(DisplayName="Falloff Radius") float  Radius,
UPARAM(DisplayName="Field Magnitude") float  Magnitude,
UPARAM(DisplayName="Cluster Levels") int32  Iterations 
)

ApplyExternalStran This function will dispatch a command to the physics thread to apply a strain field on a clustered set of geometry. This is used to trigger a breaking event within the solver.

Parameters
EnabledIs this force enabled for evaluation.
PositionThe origin point of the force
RadiusRadial influence from the position, positions further away are weaker.
MagnitudeThe size of the linear force.
IterationsLevels of evaluation into the cluster hierarchy.

◆ ApplyUniformVectorFalloffForce()

void UFieldSystemComponent::ApplyUniformVectorFalloffForce ( UPARAM(DisplayName="Enable Field") bool  Enabled,
UPARAM(DisplayName="Center Position") FVector  Position,
UPARAM(DisplayName="Uniform Direction") FVector  Direction,
UPARAM(DisplayName="Falloff Radius") float  Radius,
UPARAM(DisplayName="Field Magnitude") float  Magnitude 
)

FalloffUniformForce This function will dispatch a command to the physics thread to apply a linear force in a uniform direction. The force vector is weaker as it moves away from the center.

Parameters
EnabledIs this force enabled for evaluation.
PositionThe origin point of the force
DirectionThe direction of the linear force
RadiusRadial influence from the position, positions further away are weaker.
MagnitudeThe size of the linear force.

◆ BuildFieldCommand()

void UFieldSystemComponent::BuildFieldCommand ( bool  Enabled,
EFieldPhysicsType  Target,
UFieldSystemMetaData MetaData,
UFieldNodeBase Field,
const bool  IsTransient 
)
protected

Build a physics field command and dispatch it

◆ ClearFieldCommands()

void UFieldSystemComponent::ClearFieldCommands ( )
protected

Remove the persistent commands from chaos/world

◆ CreateSceneProxy()

FPrimitiveSceneProxy * UFieldSystemComponent::CreateSceneProxy ( )
overridevirtual

◆ DispatchFieldCommand()

void UFieldSystemComponent::DispatchFieldCommand ( const FFieldSystemCommand InCommand,
const bool  IsTransient 
)
protected

Dispatch the field command to chaos/world

◆ GetConstructionFields()

const TArray< FFieldSystemCommand > & UFieldSystemComponent::GetConstructionFields ( ) const
inline

Get all the construction fields

◆ GetFieldSystem()

const UFieldSystem * UFieldSystemComponent::GetFieldSystem ( ) const
inline

Get the field system asset

◆ GetPhysicsScenes()

TSet< FPhysScene_Chaos * > UFieldSystemComponent::GetPhysicsScenes ( ) const
protected

Get ell ethe supported physics scenes

◆ GetPhysicsSolvers()

TArray< Chaos::FPhysicsSolverBase * > UFieldSystemComponent::GetPhysicsSolvers ( ) const
protected

Get ell the supported physics solvers

◆ HasAnySockets()

virtual bool UFieldSystemComponent::HasAnySockets ( ) const
inlineoverridevirtual

◆ HasValidPhysicsState()

bool UFieldSystemComponent::HasValidPhysicsState ( ) const
overrideprotectedvirtual

◆ OnCreatePhysicsState()

void UFieldSystemComponent::OnCreatePhysicsState ( )
overrideprotectedvirtual

◆ OnDestroyPhysicsState()

void UFieldSystemComponent::OnDestroyPhysicsState ( )
overrideprotectedvirtual

◆ RemovePersistentFields()

void UFieldSystemComponent::RemovePersistentFields ( )

RemovePersistentFields This function will remove all the field component persistent fields from chaos and from the world

◆ ResetFieldSystem()

void UFieldSystemComponent::ResetFieldSystem ( )

RemoveConstructionFields This function will remove all the field component construction fields from chaos and from the world

◆ SetFieldSystem()

void UFieldSystemComponent::SetFieldSystem ( UFieldSystem FieldSystemIn)
inline

Set the field system asset

◆ ShouldCreatePhysicsState()

bool UFieldSystemComponent::ShouldCreatePhysicsState ( ) const
overrideprotectedvirtual

Friends And Related Symbol Documentation

◆ FFieldSystemEditorCommands

friend class FFieldSystemEditorCommands
friend

Member Data Documentation

◆ bHasPhysicsState

bool UFieldSystemComponent::bHasPhysicsState
protected

Boolean to check that the physics state has been built

◆ bIsChaosField

bool UFieldSystemComponent::bIsChaosField

If enabled the field will be used by all the chaos solvers

◆ bIsWorldField

bool UFieldSystemComponent::bIsWorldField

If enabled the field will be pushed to the world fields and will be available to materials and niagara

◆ BufferCommands

FFieldObjectCommands UFieldSystemComponent::BufferCommands

List of all the buffer command

◆ ChaosModule

FChaosSolversModule* UFieldSystemComponent::ChaosModule
protected

Chaos module linked to that component

◆ ChaosPersistentFields

TArray< FFieldSystemCommand > UFieldSystemComponent::ChaosPersistentFields
protected

List of all the chaos peristent fields

◆ ConstructionCommands

FFieldObjectCommands UFieldSystemComponent::ConstructionCommands

List of all the construction command

◆ FieldSystem

TObjectPtr<UFieldSystem> UFieldSystemComponent::FieldSystem

Field system asset to be used to store the construction fields

◆ SetupConstructionFields

TArray< FFieldSystemCommand > UFieldSystemComponent::SetupConstructionFields
protected

List of all the field used to setup chaos (anchor...)

◆ SupportedSolvers

TArray<TSoftObjectPtr<AChaosSolverActor> > UFieldSystemComponent::SupportedSolvers

List of solvers this field will affect. An empty list makes this field affect all solvers.

◆ WorldCPUPersistentFields

TArray< FFieldSystemCommand > UFieldSystemComponent::WorldCPUPersistentFields
protected

List of the world CPU peristent fields created by this field component

◆ WorldGPUPersistentFields

TArray< FFieldSystemCommand > UFieldSystemComponent::WorldGPUPersistentFields
protected

List of the world GPU peristent fields created by this field component


The documentation for this class was generated from the following files: