Skip to content

Subsystems

UDRW_InteractionSubsystem (UWorldSubsystem)

Purpose: Manages ocean water interaction effects (ripples, wakes, foam): tracks active sources and renders them into a scrolling buffer that follows the camera. Buffer resolution is configurable via RTResolution.

Access: GetWorld()->GetSubsystem<UDRW_InteractionSubsystem>()

PropertyTypeDefaultDescription
RTResolutionint322048Render target resolution. Range: 512–4096.
WorldCoveragefloat51200.0World-space coverage (cm). Range: 1000–200000.
DecayRatefloat0.2Effect fade rate. Range: 0.01–5.
AdvectionStrengthfloat0.5Wake propagation. Range: 0–1.
DiffusionStrengthfloat0.5Wake spread. Range: 0–1.
MaxSourcesPerFrameint32100Performance cap. Range: 1–500.
FixedUpdateRateHzfloat30.0Update rate. Range: 10–60.
bEnabledbooltrueMaster enable.
DefaultInteractionDataAssetInteractionDataAsset:When assigned, overrides the per-property defaults below with the asset’s values.
Performance
MinScreenSizeThresholdfloat0.002Sources whose Radius / Distance falls below this are culled. Higher = more aggressive culling. Range: 0–0.1.
MaxInteractionDistancefloat100000.0Sources beyond this distance (cm) are culled regardless of size. Set to 0 to disable.
Thresholds
MinSpeedForRipplefloat15.0Minimum horizontal speed (cm/s) to generate ripples. Range: 1–100.
MinSpeedForWakefloat200.0Minimum horizontal speed (cm/s) for wake generation. Range: 50–500.
MinRadiusForWakefloat100.0Minimum object radius (cm) to generate wakes. Range: 10–500.
MinVerticalSpeedForSplashfloat30.0Minimum vertical speed (cm/s) to register an impact splash. Range: 10–200.
ImpactSplashDurationfloat3.0Seconds an impact splash remains active. Range: 0.5–10.
FunctionReturnsDescription
RegisterInteractionSource(PhysicsBody)voidRegister a physics body.
UnregisterInteractionSource(PhysicsBody)voidUnregister.
SpawnSplashAtLocation(Position, Radius, Intensity)voidManual splash spawn.
SetEnabled(bEnabled)voidToggle system.
SetGridManager(GridManager)voidWire up the grid manager (called automatically by BP_DynamicRealWater).
ClearInteractions()voidClear all effects.
GetInteractionRT()RenderTarget2DCurrent interaction RT.
GetRTWorldCenter()FVector2DWorld-space centre of the scrolling buffer.
GetWorldCoverage()floatWorld-space extent (cm).
IsInteractionEnabled()boolTrue when the subsystem is enabled and the RT is initialised.
GetRegisteredSourceCount() / GetActiveSourceCount()int32Source metrics.

UDRW_DebugSubsystem (UWorldSubsystem)

Purpose: Centralized debug visualization for all DRW physics systems. Handles force arrows, velocity vectors, on-screen stats, and shape visualization.

Access:

UDRW_DebugSubsystem* Debug = GetWorld()->GetSubsystem<UDRW_DebugSubsystem>();
Debug->AddForce(TEXT("Buoyancy"), Force, Location, EDRW_DebugCategory::Buoyancy, this);

Runtime toggles for the visualization. Set from the in-editor console (~) or from any Exec node.

PropertyTypeDescription
DRW.DebugboolMaster toggle for all debug visualization.
DRW.Debug.catint32 (bitmask)Categories to display (bitmask).
DRW.Debug.filterboolFilter debug to specific actor.
DRW.Debug.helpboolShow all debug commands.
DRW.Debug.netboolShow net force arrow.
DRW.Debug.presetboolApply debug preset.
DRW.Debug.scalefloatArrow length scale.
DRW.Debug.shapesfloatDraw a debug shape (box, sphere, capsule) with optional label.
DRW.Debug.statsfloatShow on screen text stats.
DRW.Debug.statusboolShow current debug settings.
DRW.Debug.thicknessfloatArrow thickness.
DRW.Debug.thresholdfloatMinimum force (N) to display.

The same settings exposed as C++ properties on the subsystem: set programmatically when you don’t want to type a console command.

PropertyTypeDefaultDescription
bEnabledboolfalseMaster toggle.
EnabledCategoriesint32 (bitmask)AllBuoyancy, Gravity, Damping, Drag, Thrust, Steering, Stability, Velocity.
bShowPerShapebooltruePer-shape vs aggregate forces.
bShowOnScreenStatsbooltrueOn-screen text overlay.
bShowNetForcebooltrueShow the per-actor net-force vector.
Display
ArrowScalefloat0.05Force arrow length scale. Range: 0.0001–1.
ArrowThicknessfloat5.0Force arrow line thickness. Range: 0.5–10.
MinForceThresholdfloat0.1Min force to display (N).
TextScalefloat1.25On-screen text scale. Range: 0.5–3.
DrawDurationfloat0.0Persistence per draw call (seconds). 0 = single frame.
bOffsetOverlappingVectorsbooltrueSpread arrows that overlap in world space so they’re individually readable.
OverlapOffsetSpacingCmfloat50.0Spacing between offset arrows (cm).
OverlapLocationQuantizeCmfloat5.0Position-quantisation tolerance for grouping overlapping arrows.

Usage: DRW components push debug data into this subsystem automatically while their physics tick runs. Users interact with the subsystem through its properties: toggling categories at runtime, changing arrow scale, filtering to specific actors. The push API is C++-only.