UKawaiiPhysicsLibrary — Transient Effects and Wind
Added in v1.22.0
Control temporary settings multipliers, gusts, wind parameters, and the Shared Publisher from Blueprint and C++. See Settings Multiplier and Procedural Wind for effect setup.
Blueprint Start and Stop
| Target | Start | Stop |
|---|---|---|
| Node reference | StartPhysicsSettingsMultiplier | StopPhysicsSettingsMultiplier |
| Component | StartPhysicsSettingsMultiplierOnComponent | StopPhysicsSettingsMultiplierOnComponent |
Save Start's OutHandle and Stop the same target/handle. Component forms collect main, linked, and post-process AnimInstances. Empty Filter Tags matches all; bFilterExactMatch=false permits parent tags. Their return values count nodes where requests were queued.
Duration includes both fades. Positive means a trapezoid, zero is a no-op, and negative holds until Stop. If Blend In + Out exceeds Duration, the fades scale proportionally. Negative Duration ignores Start's Blend Out and uses Stop's value for release.
Duration and Blend In / Out advance in the node's physics time (animation DeltaTime x the node's TimeScale). If URO / LOD stops evaluation or TimeScale is below 1, they last longer in real time.
Stop fades linearly from the current applied ratio to 0. Blend Out 0 releases immediately. Stopping the same still-pending handle replaces its release fade time.
C++ Updates and Threading
GenerateTransientHandle, PushPhysicsSettingsMultiplier, and PushPhysicsSettingsMultiplierOnComponent are C++ only, not Blueprint-exposed. Update using one pre-generated handle and Stop when finished. Pushing an unset handle is a no-op; the node-reference form reports NotValid.
Push updates the same entry and returns a stopped/fading entry to external drive. The ordinary overload does not expire by time. The component overload with a lease fades after the specified number of evaluations without refresh. Repeated pushes to the same handle during URO/LOD pauses retain only the latest pending value.
AnimGraph BlueprintThreadSafe collection must target the caller's own component. Collect other objects on the GameThread while they are not being evaluated. Blueprint can hold using negative Start Duration, but arbitrary-Alpha Push updates are not exposed.
Animation Notifies · Kawaii Physics Settings Multiplier · UKawaiiPhysicsLibrary
The effective scale is calculated as Lerp(1, Scale, EnvelopeAlpha).
APIs and Application Scope
Gust and Transient Force APIs
Use the handle-based APIs in UKawaiiPhysicsLibrary to add a short burst for a gameplay event. These are runtime-only transient forces; they do not append to the authored External Forces array.
| API | Purpose |
|---|---|
StartProceduralWindGust | Start a gust on one node and obtain OutHandle |
StartProceduralWindGustOnComponent | Start gusts on filtered component nodes, including linked / post-process instances |
AddTransientExternalForce / AddTransientExternalForceOnComponent | Add a generic force struct with LifetimeSeconds |
StopTransientExternalForce / StopTransientExternalForceOnComponent | Stop forces early using the stored handle |
Strength is the gust's peak strength. Duration includes rise, hold, and decay; hold is calculated as max(0, Duration - RiseTime - DecayTime). A nonzero GustDirection specifies a world-space direction. A zero vector inherits direction, space, bone filters, and related settings from an authored Procedural Wind. On the node API, ExternalForceIndex = -1 uses the first enabled Procedural Wind as the inheritance source.
When RiseTime + DecayTime exceeds Duration, both are shortened by the same ratio so that their sum fits in Duration, and the hold time becomes 0. Specify a positive, finite Duration. At zero or below, or with a non-finite value, no gust is started: the node API returns NotValid, the component API returns 0, the shared gust API returns false, and the handle stays unset.
A gust's Duration and a generic transient force's LifetimeSeconds advance in the node's physics time. With the node's TimeScale at 0.5, they last twice as long in real time. However, while the wind a gust inherits from is using the publisher's wind, the gust also advances with that wind's clock and does not follow the node's TimeScale. If the publisher's wind is disabled or the clock of the inherited wind rewinds, the gust then finishes on its own clock (the node's physics time).
bRealTimeEnvelope defaults to true and ignores the ProceduralWind TimeScale (the wind's own time multiplier); it still follows the node's TimeScale. With false, the inherited wind's Time Scale also affects progress. Both depend on animation evaluation: URO / LOD suspension can extend the elapsed real duration.
Stopping with BlendOutTime fades Procedural Wind linearly from its current value, using the same clock as the gust. Zero or a non-finite value removes it immediately. Calling Stop again on a gust that is already stopping does not extend the fade. Generic transient forces do not use this fade; their lifetime is shortened instead.
Transient forces are capped at 8 per node. Adding more evicts the oldest entry. Node re-initialization and BP recompile also remove them. IsTransientHandleSet only checks whether the ID is set; it does not prove the force still exists. Stopping a stale handle does nothing.
A force's Initialize(Context) runs on the evaluating worker thread just before its first use. Forces containing live UObject references, such as ExternalOwner or curve assets, are rejected, so not every force can be used as a transient force.
Component APIs return the number of nodes where a request was queued. Empty FilterTags matches all nodes. In an AnimGraph evaluation context, operate on the caller's own component; operations on other objects belong on the GameThread while the target is not evaluating. See UKawaiiPhysicsLibrary for the access contract and AnimNotify / NotifyState for animation-triggered gusts.
Wind Preset and Dynamic Parameter Details
A KawaiiPhysics Wind Preset Data Asset stores wind tuning values. Unlike the whole-node UKawaiiPhysicsPresetDataAsset, it applies specifically to Procedural Wind. Each entry in Presets contains a PresetName, PresetTag, and wind values. Tags are matched exactly.
ApplyProceduralWindPreset targets a node reference and external-force index; ApplyProceduralWindPresetOnComponent targets wind entries in filtered component nodes. Changes are requested for the next PreApply. Pre-load the DataAsset and avoid editing or reloading it while simulation is running.
ToDynamicParams() updates these 11 fields:
ConstantForceSwayForce,SwayPeriodRippleForce,RipplePeriod,RippleTipPhaseDelayStrengthCycleRange,StrengthCyclePeriodRandomForce,RandomForcePeriodWindDirectionNoiseAngle
It preserves WindDirection, enabled state, phase offsets, TimeScale, and WindDirectionNoisePeriod. Applying this preset also does not create a new external-force entry.
When no DataAsset is supplied, or its Presets array is empty, the built-in tags KawaiiPhysics.WindPreset.Breeze / Strong / Storm are available. A supplied asset with entries is searched exclusively; a missing tag does not fall back to the built-in presets. An invalid tag fails as well.
Use FKawaiiProceduralWindDynamicParams with SetProceduralWindParameters / SetProceduralWindParametersOnComponent for individual changes. Only fields with their corresponding bOverride... flag set to true are changed. To change constant wind only, set bOverrideConstantForce and ConstantForce, leaving other overrides false.
GetProceduralWindParameters includes pending updates issued earlier in the same frame and returns all overrides as true. You can edit and submit that snapshot, or create a new struct with only the intended overrides enabled. Wind Scope helps compare waveforms and presets.
What's New in v1.22 · External Force Presets
Runtime Control
Kawaii Physics Shared Publisher is an experimental feature in v1.22. Its settings and behavior, including the APIs described here, may change in the next version.
UKawaiiPhysicsLibrary provides SetSharedPublisherEnabled, SetSimpleWorldCollisionSettingsOnSharedPublisher, SetProceduralWindParametersOnSharedPublisher, shared gust start/stop operations, and GetSharedPublisherDebugInfo. Specify an Actor and group tag, and check the return value. The tag is matched exactly against the publisher's Shared Group Tag; a parent tag does not match. Requests are processed on a subsequent publisher update rather than synchronously changing every consumer. Runtime overrides of Enabled and collision settings revert to node settings on reinitialization. Wind parameter updates modify the Shared Wind settings and remain after reinitialization.
See UKawaiiPhysicsLibrary for related operations and GetRuntimeNodeInfosOnComponent for inspection data.
The publisher also shares 13 wind parameters and active gust state. Use SetProceduralWindParametersOnSharedPublisher to update shared values, and StartProceduralWindGustOnSharedPublisher / StopProceduralWindGustOnSharedPublisher to start or stop a shared gust. These differ from handle-based APIs that add transient forces to individual nodes. Up to 8 shared gusts overlap and add up; beyond that, the oldest gust is dropped. Stopping affects every shared gust running at that point. See Kawaii Physics Shared Publisher for targets and persistence.
Related UE documentation
-
Gameplay Tags — Review the tag dictionary and hierarchy; consult each reference for KawaiiPhysics matching rules. (UE 5.8)
-
Animation Notifies — Review Notify tracks, NotifyState intervals, and event firing conditions. (UE 5.8)
-
Data Assets — Review data stored in assets and instances of existing Data Asset classes. (UE 5.8)