Skip to main content

External Forces Parameters

Parameters related to externally applied forces.

View Source

Gravity

Gravity

Gravity - Gravity vector applied to bones.

PropertyValue
TypeFVector
Default(0, 0, 0)
CategoryForce
// Apply downward gravity
Gravity = FVector(0, 0, -1.0f);

bUseLegacyGravity

Legacy Gravity Method - Specifies the Gravity application method.

PropertyValue
Typebool
Defaultfalse
CategoryForce
ValueDescription
trueLegacy compatible (adds 0.5 * Gravity * dt^2 to position)
falseAnimDynamics compatible (adds Gravity * dt to velocity, then updates position)

bUseDefaultGravityZProjectSetting

Use Project Setting Gravity - Flag to multiply Gravity vector by the project setting's DefaultGravityZ (absolute value).

PropertyValue
Typebool
Defaultfalse
CategoryForce

bUseWorldSpaceGravity

World Space Gravity - Flag for whether to handle gravity in world coordinate system.

PropertyValue
Typebool
Defaulttrue
CategoryForce

Wind

bEnableWind

Enable Wind - Flag for whether to receive influence from WindDirectionalSource as external force.

PropertyValue
Typebool
Defaultfalse
CategoryForce

WindScale

Wind Scale - Influence degree of wind from WindDirectionalSource. Used for compatibility with Cloth and SpeedTree.

PropertyValue
Typefloat
Default1.0
Edit ConditionbEnableWind == true
CategoryForce
note

WindScale is only effective when bEnableWind is true.

WindDirectionNoiseAngle

Wind Direction Noise - Noise (angle) applied to wind direction from WindDirectionalSource. Adds randomness to the wind direction to soften mechanical-looking sway.

PropertyValue
Typefloat
Default0.0
UnitDegrees
Range0 or higher
Edit ConditionbEnableWind == true
CategoryForce

Simple External Force

SimpleExternalForce

Simple External Force Vector - Allows applying force in any direction.

PropertyValue
TypeFVector
Default(0, 0, 0)
CategoryForce|External Force

bUseWorldSpaceSimpleExternalForce

World Space External Force - Flag for whether to handle simple external force in world coordinate system.

PropertyValue
Typebool
Defaulttrue
CategoryForce|External Force

External Force Presets

ExternalForces

External Force Presets (Instanced Struct) - External force presets. Custom presets can be added in C++.

UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Force|External Force",
meta = (BaseStruct = "/Script/KawaiiPhysics.KawaiiPhysics_ExternalForce", ExcludeBaseStruct))
TArray<FInstancedStruct> ExternalForces;

CustomExternalForces (Experimental)

Custom External Forces (Instanced Property) - Custom presets can be added in BP/C++.

UPROPERTY(EditAnywhere, BlueprintReadWrite, Instanced, Category = "Force|External Force",
meta=(DisplayName="CustomExternalForces(EXPERIMENTAL)"))
TArray<TObjectPtr<UKawaiiPhysics_CustomExternalForce>> CustomExternalForces;
warning

This feature is highly experimental. It may not work properly unless you click on the AnimNode or compile the Animation Blueprint.

Tag

KawaiiPhysicsTag

Filtering Tag - GameplayTag for filtering, used with ExternalForce, etc.

PropertyValue
TypeFGameplayTag
CategoryTag
// Apply external force using tag
FGameplayTagContainer FilterTags;
FilterTags.AddTag(FGameplayTag::RequestGameplayTag("KawaiiPhysics.Hair"));
UKawaiiPhysicsLibrary::AddExternalForcesToComponent(MeshComp, ExternalForces, Owner, FilterTags);

Runtime Control / Blueprint API

External forces can be added and removed dynamically from Blueprint (AddExternalForce / AddExternalForcesToComponent / RemoveExternalForcesFromComponent). See the following for steps and signatures.

This page is the reference for external-force parameters. For actual usage, see the following guides.