Subsystems
InteractionSubsystem
Section titled “InteractionSubsystem”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>()
Properties
Section titled “Properties”| Property | Type | Default | Description |
|---|---|---|---|
| RTResolution | int32 | 2048 | Render target resolution. Range: 512–4096. |
| WorldCoverage | float | 51200.0 | World-space coverage (cm). Range: 1000–200000. |
| DecayRate | float | 0.2 | Effect fade rate. Range: 0.01–5. |
| AdvectionStrength | float | 0.5 | Wake propagation. Range: 0–1. |
| DiffusionStrength | float | 0.5 | Wake spread. Range: 0–1. |
| MaxSourcesPerFrame | int32 | 100 | Performance cap. Range: 1–500. |
| FixedUpdateRateHz | float | 30.0 | Update rate. Range: 10–60. |
| bEnabled | bool | true | Master enable. |
| DefaultInteractionDataAsset | InteractionDataAsset | : | When assigned, overrides the per-property defaults below with the asset’s values. |
| Performance | |||
| MinScreenSizeThreshold | float | 0.002 | Sources whose Radius / Distance falls below this are culled. Higher = more aggressive culling. Range: 0–0.1. |
| MaxInteractionDistance | float | 100000.0 | Sources beyond this distance (cm) are culled regardless of size. Set to 0 to disable. |
| Thresholds | |||
| MinSpeedForRipple | float | 15.0 | Minimum horizontal speed (cm/s) to generate ripples. Range: 1–100. |
| MinSpeedForWake | float | 200.0 | Minimum horizontal speed (cm/s) for wake generation. Range: 50–500. |
| MinRadiusForWake | float | 100.0 | Minimum object radius (cm) to generate wakes. Range: 10–500. |
| MinVerticalSpeedForSplash | float | 30.0 | Minimum vertical speed (cm/s) to register an impact splash. Range: 10–200. |
| ImpactSplashDuration | float | 3.0 | Seconds an impact splash remains active. Range: 0.5–10. |
Blueprint API
Section titled “Blueprint API”| Function | Returns | Description |
|---|---|---|
| RegisterInteractionSource(PhysicsBody) | void | Register a physics body. |
| UnregisterInteractionSource(PhysicsBody) | void | Unregister. |
| SpawnSplashAtLocation(Position, Radius, Intensity) | void | Manual splash spawn. |
| SetEnabled(bEnabled) | void | Toggle system. |
| SetGridManager(GridManager) | void | Wire up the grid manager (called automatically by BP_DynamicRealWater). |
| ClearInteractions() | void | Clear all effects. |
| GetInteractionRT() | RenderTarget2D | Current interaction RT. |
| GetRTWorldCenter() | FVector2D | World-space centre of the scrolling buffer. |
| GetWorldCoverage() | float | World-space extent (cm). |
| IsInteractionEnabled() | bool | True when the subsystem is enabled and the RT is initialised. |
| GetRegisteredSourceCount() / GetActiveSourceCount() | int32 | Source metrics. |
DebugSubsystem
Section titled “DebugSubsystem”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);Console variables
Section titled “Console variables”Runtime toggles for the visualization. Set from the in-editor console (~) or from any Exec node.
| Property | Type | Description |
|---|---|---|
DRW.Debug | bool | Master toggle for all debug visualization. |
DRW.Debug.cat | int32 (bitmask) | Categories to display (bitmask). |
DRW.Debug.filter | bool | Filter debug to specific actor. |
DRW.Debug.help | bool | Show all debug commands. |
DRW.Debug.net | bool | Show net force arrow. |
DRW.Debug.preset | bool | Apply debug preset. |
DRW.Debug.scale | float | Arrow length scale. |
DRW.Debug.shapes | float | Draw a debug shape (box, sphere, capsule) with optional label. |
DRW.Debug.stats | float | Show on screen text stats. |
DRW.Debug.status | bool | Show current debug settings. |
DRW.Debug.thickness | float | Arrow thickness. |
DRW.Debug.threshold | float | Minimum force (N) to display. |
Subsystem properties
Section titled “Subsystem properties”The same settings exposed as C++ properties on the subsystem: set programmatically when you don’t want to type a console command.
| Property | Type | Default | Description |
|---|---|---|---|
| bEnabled | bool | false | Master toggle. |
| EnabledCategories | int32 (bitmask) | All | Buoyancy, Gravity, Damping, Drag, Thrust, Steering, Stability, Velocity. |
| bShowPerShape | bool | true | Per-shape vs aggregate forces. |
| bShowOnScreenStats | bool | true | On-screen text overlay. |
| bShowNetForce | bool | true | Show the per-actor net-force vector. |
| Display | |||
| ArrowScale | float | 0.05 | Force arrow length scale. Range: 0.0001–1. |
| ArrowThickness | float | 5.0 | Force arrow line thickness. Range: 0.5–10. |
| MinForceThreshold | float | 0.1 | Min force to display (N). |
| TextScale | float | 1.25 | On-screen text scale. Range: 0.5–3. |
| DrawDuration | float | 0.0 | Persistence per draw call (seconds). 0 = single frame. |
| bOffsetOverlappingVectors | bool | true | Spread arrows that overlap in world space so they’re individually readable. |
| OverlapOffsetSpacingCm | float | 50.0 | Spacing between offset arrows (cm). |
| OverlapLocationQuantizeCm | float | 5.0 | Position-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.