Components
BuoyancyComponent
Section titled “BuoyancyComponent”UDRW_BuoyancyComponent
Purpose: Simulates physically accurate buoyancy with per-shape force calculation. Buoyant force is integrated against water heights sampled non-blocking from the GPU, so gameplay reads never stall the main thread.
Attach To: Any actor with a physics-simulating mesh (static mesh, skeletal mesh).
Required Components: PhysicsBodyComponent (defines shapes).
Properties
Section titled “Properties”| Property | Type | Default | Description |
|---|---|---|---|
| Setup | |||
| WaterHeightmapRenderTarget | RenderTarget2D | : | Heightmap RT (auto-assigned by GridManager). |
| WaterDepthmapRenderTarget | RenderTarget2D | : | Depth map RT (auto-assigned by GridManager). |
| bEnableMultiplayerSupport | bool | true | Enable replication. |
| bPlayableCharacter | bool | false | Character mode (different force application). |
| Water properties | |||
| WaterDensity | float | 1025.0 | Water density kg/m³. Range: 900–1100. |
| WaterViscosity | float | 0.01 | Viscosity Pa·s. Range: 0.001–0.1. |
| InWaterThreshold | float | 0.01 | Min submersion ratio for bIsInWater. Range: 0.001–0.5. |
| Simulation | |||
| UpdateMode | EDRWBuoyancyUpdateMode | FixedOnly | EventTick, FixedSubstep (WIP), or FixedOnly (recommended). |
| CalculationRateHz | float | 30.0 | Fixed timestep rate. Range: 1–120. |
| InterpolationStrength | float | 0.15 | Smoothing between snapshots. Range: 0–1. |
| PhysicsQuality | EDRWPhysicsQuality | Async | Async, Mixed, or Runtime: see Physics quality modes. |
| InteractionHeightMultiplier | float | 1.0 | Contribution of interaction effects (wakes, ripples) to buoyancy sampling. Set to 0 to make ripples visual-only. |
| Velocity limits | |||
| MaxLinearSpeed | float | 50.0 | Max speed before damping (m/s). Range: 1–100. |
| MaxAngularSpeed | float | 10.0 | Max angular speed (rad/s). Range: 0.5–20. |
| VelocityDampingStrength | float | 0.1 | Damping aggressiveness. Range: 0.01–1. |
| Rotational damping | |||
| PitchRollDampingMultiplier | float | 1.0 | Multiplier on pitch/roll damping. |
| YawDampingMultiplier | float | 1.0 | Multiplier on yaw damping. |
| Heave damping | |||
| bEnableHeaveDamping | bool | true | Vertical oscillation damping. |
| HeaveDampingCoefficient | float | 0.7 | Fraction of critical damping. Range: 0.1–2. |
| HeaveAddedMassCoefficient | float | 1.0 | Vertical added mass. Range: 0.3–2. |
| HeaveVelocityThreshold | float | 5.0 | Below this vertical speed (cm/s), heave damping tapers off. Range: 0.5–30. |
| Lateral added mass | |||
| bEnableLateralAddedMass | bool | true | Apply added-mass effects to surge and sway motion (resists drifting and longitudinal acceleration). |
| SurgeAddedMassCoefficient | float | 0.1 | Forward / backward added-mass fraction. Typically small (streamlined hulls 0.05–0.15, blunt objects up to 0.5). |
| SwayAddedMassCoefficient | float | 0.8 | Sideways added-mass fraction. Typically large for ship hulls: this is the main “doesn’t slide sideways” knob. |
| Slamming | |||
| bEnableSlamming | bool | true | Impact forces when entering water. |
| SlammingCoefficient | float | 1.0 | Slamming intensity. Range: 0.1–5. |
| SlammingVelocityThreshold | float | 5.0 | Min vertical speed for slam (cm/s). Range: 10–500. |
| bEnableExitDamping | bool | true | Damp exit velocity when a hull breaches above the surface to avoid unrealistic ejection. |
| ExitDampingRatio | float | 0.7 | Fraction of vertical velocity preserved when exiting. Range: 0.1–1. |
| Advanced | |||
| bEnablePrediction | bool | true | Predict water heights one frame ahead: smoother buoyancy on remote clients. |
| HeightmapHistorySize | int32 | 4 | Snapshot buffer depth used for prediction. |
Blueprint API
Section titled “Blueprint API”| Function | Returns | Description |
|---|---|---|
| CalculateBuoyancyOutput() | void | Force recalculation. |
| GetInterpolatedOutput(BodyIndex) | BuoyancyOutput | Per-body interpolated state. |
| IsInWaterBody() | bool | True if in a discrete water body. |
| GetWaterBody() | WaterBody | Current overlapping water body. |
Delegates
Section titled “Delegates”| Delegate | Signature | Fires when |
|---|---|---|
| OnBuoyancyOutputsUpdated | (UpdatedOutputs : Array<BuoyancyOutput>) | Each time the buoyancy snapshot updates. Recommended hook for swimming, animation, audio. |
Multiplayer: BuoyancyOutputs array replicated with RepNotify. bIsInWater replicated. Server calculates, clients receive results.
PhysicsBodyComponent
Section titled “PhysicsBodyComponent”UDRW_PhysicsBodyComponent
Purpose: Defines collision shapes (box, sphere, capsule) for buoyancy calculation. Computes total mass, volume, and center of mass.
Attach To: Any actor that needs buoyancy.
Required Components: None (but BuoyancyComponent reads from this).
Properties
Section titled “Properties”| Property | Type | Default | Description |
|---|---|---|---|
| TargetComponentName | FName | : | Name of the mesh component to attach shapes to. |
| MainMaterialType | EDRW_MaterialType | Wood | Default material (determines density). |
| bEnableWaterInteraction | bool | true | Generate water interaction effects from this body. |
| Boxes | Array<BoxShape> | : | Box collision shapes. |
| Spheres | Array<SphereShape> | : | Sphere collision shapes. |
| Capsules | Array<CapsuleShape> | : | Capsule collision shapes. |
| bUseCustomCenterOfMass | bool | false | Use shape-based CoM instead of physics engine CoM. |
| CenterOfMassOffset | FVector | (0,0,0) | Manual CoM offset. |
| Interaction override | |||
| bOverrideInteractionBounds | bool | false | Override auto-derived bounds. |
| InteractionRadius | float | 100.0 | Override radius (cm). |
| InteractionHullLength | float | 200.0 | Override hull length (cm). |
| InteractionHullWidth | float | 100.0 | Override hull width (cm). |
Blueprint API
Section titled “Blueprint API”| Function | Returns | Description |
|---|---|---|
| DebugDrawShapes() | void | Draw shape wireframes. |
Shape types
Section titled “Shape types”Each shape inherits a common base (Transform, MaterialType, Name, TargetBoneName, bEnableWaterInteraction) plus its own geometry:
- Box:
Extents(FVector half-size in cm). - Sphere:
Radius(cm). - Capsule:
RadiusandHalfHeight(cm).
A shape becomes “subtractive” (carves volume rather than adding it) automatically when MaterialType = Air. There’s no manual subtract toggle: material drives operation.
Each shape can be additive (contributes volume) or subtractive (hollows out volume, e.g. cabin). Material types include Wood (800), Steel (7850), Aluminum (2700), HighDensityFoam (450), and 30+ others.
See the hull approximation guide for the workflow.
SmoothReplicationComponent
Section titled “SmoothReplicationComponent”UDRW_SmoothReplicationComponent
Purpose: Client-side transform interpolation / extrapolation for networked actors. Maintains a state buffer and reconstructs smooth movement on remote clients.
Attach To: Any networked actor with a static-mesh root (vessels, floating objects).
Required Components: None.
Properties
Section titled “Properties”| Property | Type | Default | Description |
|---|---|---|---|
| Core | |||
| bEnableSmoothing | bool | true | Master enable. |
| bUsePollBasedDetection | bool | true | Poll for state changes vs explicit notification. |
| Timing | |||
| InterpolationRelativeTime | float | 0.1 | Render delay from owner time (seconds). Range: 0–0.5. |
| TimeSmoothing | float | 2.0 | Time offset smoothing (seconds). Range: 0–5. |
| SendRateHz | float | 30.0 | Expected send rate. Range: 1–120. |
| bUseHermiteInterpolation | bool | true | Hermite spline for smoother curves. |
| Lerp | |||
| PositionLerpSpeed | float | 0.85 | Position lerp per frame. Range: 0–1. |
| RotationLerpSpeed | float | 0.85 | Rotation lerp per frame. Range: 0–1. |
| ScaleLerpSpeed | float | 0.85 | Scale lerp per frame. Range: 0–1. |
| VelocitySmoothingRate | float | 10.0 | Smoothing rate for the calculated velocity outputs (per second). Range: 1–30. |
| Thresholds | |||
| ReceivedPositionThreshold | float | 0.0 | Drop position updates that differ by less than this (cm). Set to 0 to always update. |
| ReceivedRotationThreshold | float | 0.0 | Drop rotation updates that differ by less than this (degrees). Set to 0 to always update. |
| Extrapolation | |||
| bEnableExtrapolation | bool | true | Extrapolate when buffer runs out. |
| ExtrapolationTimeLimit | float | 0.5 | Max extrapolation time (seconds). Range: 0–2. |
| ExtrapolationDistanceLimit | float | 500.0 | Max extrapolation distance (cm). |
| Snap | |||
| PositionSnapThreshold | float | 500.0 | Snap if error exceeds this (cm). 0 = disabled. |
| RotationSnapThreshold | float | 90.0 | Snap if angle exceeds this (degrees). |
Blueprint API
Section titled “Blueprint API”| Function | Returns | Description |
|---|---|---|
| ReceiveNetworkState(…) | void | Feed a new state from the network. |
| NotifyReplicatedMovementUpdate() | void | Notify that replicated movement changed (poll mode). |
| SnapToReplicatedTransform() | void | Instant snap. |
| ClearBuffer() | void | Clear state buffer. |
| Teleport() | void | Mark next transition as teleport. |
| GetSmoothedTransform() | FTransform | Current interpolated transform. |
| IsSmoothing() / IsExtrapolating() | bool | State queries. |
| GetJitterStats() | JitterStats | Network jitter metrics. |
| GetInterpolationTime() | float | Current interpolation render-time offset. |
| GetOwnerTime() | float | Owner-time at the latest received state. |
Calculated outputs (BlueprintReadOnly)
Section titled “Calculated outputs (BlueprintReadOnly)”These are written each tick and useful for animation / audio / HUD:
| Property | Type | Description |
|---|---|---|
| CalculatedVelocity | FVector | Linear velocity derived from smoothed transform. |
| CalculatedAngularVelocity | FVector | Angular velocity derived from smoothed transform. |
| CalculatedAcceleration | FVector | Linear acceleration. |
| CalculatedSpeed | float | Linear speed (cm/s). |
| CalculatedAngularSpeed | float | Angular speed magnitude. |
Delegates
Section titled “Delegates”| Delegate | Signature | Fires when |
|---|---|---|
| OnTeleport | (ErrorMagnitude : float) | A snap (rather than smooth interpolation) was applied: useful to gate UI hints or motion blur. |
Multiplayer: Client-side only. Does not replicate: reads from replicated actor properties.
VesselMovementComponent
Section titled “VesselMovementComponent”UDRW_VesselMovementComponent
Purpose: Calculates propulsion, control surface, and resistance forces for vessels. BuoyancyComponent handles buoyancy; this handles everything else.
Attach To: Vessel or VesselPawn.
Required Components: BuoyancyComponent (for water state), a physics-simulating root component.
Properties
Section titled “Properties”| Property | Type | Default | Description |
|---|---|---|---|
| CalculationRateHz | float | 30.0 | Fixed timestep rate. Range: 1–120. |
| InterpolationStrength | float | 0.85 | Force smoothing. Range: 0–1. |
| ForceMultiplier | float | 1.0 | Global force scale. Range: 0.1–10. |
| TurnAssistMultiplier | float | 1.0 | Yaw torque boost. Range: 1–50. Default 1.0 is physically accurate; large vessels often need 5–20. |
| TrueWindVelocity | FVector | (0,0,0) | World wind for sail calculations (cm/s). |
| bEnableWindage | bool | true | Air resistance calculation. |
| WindageFrontalArea | float | 0.0 | Frontal area for air drag (cm²). |
| WindageLateralArea | float | 0.0 | Lateral area for crosswind drag (cm²). |
| WindageDragCoefficient | float | 0.8 | Multiplier on computed windage forces. |
Blueprint API
Section titled “Blueprint API”| Function | Returns | Description |
|---|---|---|
| Initialize(VesselData, PhysicsRoot, Buoyancy) | void | Initialize with data. |
| SetInput(VesselInput) | void | Apply control input. |
| GetMovementOutput() | VesselMovementOutput | Latest computed movement output (forces, state, lift). |
| GetMovementState() | MovementState | Displacement, Transition, Planing, or Foiling. |
| GetPropulsionState(Index, OutState) | bool | Per-propulsion live state (RPM, throttle, thrust). False if index invalid. |
| GetControlSurfaceState(Index, OutState) | bool | Per-control-surface live state (deflection, lift, stalled). |
| GetSpeed() / GetSpeedKnots() | float | Current speed. |
| GetFroudeNumber() | float | Hull Froude number. |
| IsPlaning() / IsFoiling() | bool | State queries. |
| SetWindVelocity(WindCmPerSec) | void | Set wind for sails. |
| GetApparentWind() | FVector | Apparent wind relative to vessel. |
Delegates
Section titled “Delegates”| Delegate | Signature | Fires when |
|---|---|---|
| OnMovementStateChanged | (NewState : EDRW_VesselMovementState) | Hull regime changes: Displacement / Transition / Planing / Foiling. Use to trigger audio, FX, camera FOV cues. |
Multiplayer: MovementOutput replicated with RepNotify.
VesselInputComponent
Section titled “VesselInputComponent”UDRW_VesselInputComponent
Purpose: Enhanced Input handling for vessel control with automatic keyboard / gamepad binding and network replication.
Attach To: VesselPawn or any pawn controlling a vessel.
Required Components: None. Optionally works with VesselCameraComponent.
Properties
Section titled “Properties”| Property | Type | Default | Description |
|---|---|---|---|
| InputSource | EDRW_VesselInputSource | AutoKeyboardMouse | Auto keyboard, auto gamepad, auto both, custom config, or custom actions. |
| InputConfig | VesselInputConfig | : | Custom input config data asset. |
| InputSmoothing | float | 0.0 | Analog smoothing. Range: 0–0.99. |
| DeadZone | float | 0.1 | Analog dead zone. Range: 0–0.5. |
| InputSendRate | float | 30.0 | Client→server send rate (Hz). Range: 1–60. |
| InputChangeTolerance | float | 0.01 | Min change to trigger send. Range: 0.001–0.1. |
| bSendPeriodicFullState | bool | true | Periodic full state for reliability. |
| Camera | |||
| bInvertCameraY | bool | false | Invert Y axis. |
| CameraLookSensitivity | float | 1.0 | Look sensitivity. Range: 0.1–5. |
| CameraZoomSensitivity | float | 1.0 | Zoom sensitivity. Range: 0.1–5. |
Blueprint API
Section titled “Blueprint API”| Function | Returns | Description |
|---|---|---|
| GetLocalInput() | VesselInput | Current local input state. |
| IsProcessingInput() | bool | True if input is active. |
| ForceReplicateInput() | void | Force immediate network send. |
Multiplayer: Input is replicated to the server with reliability tuned per signal: frequent analog updates use unreliable channels, zero-input and critical state use reliable. Input is quantized for bandwidth efficiency on the wire.
VesselCameraComponent
Section titled “VesselCameraComponent”UDRW_VesselCameraComponent
Purpose: Vessel camera with horizon stabilization, speed-based effects, and collision. The boat-camera feel is mostly tuned through the three sub-structs below.
Attach To: VesselPawn or any vessel actor.
Required Components: None. Creates SpringArm and Camera as children.
Properties: top level
Section titled “Properties: top level”| Property | Type | Default | Description |
|---|---|---|---|
| ZoomSpeed | float | 500.0 | Arm length change per second per unit of input. |
| LookSensitivity | float | 0.5 | Look input multiplier. |
| RecenterSpeed | float | 1.0 | Camera recenter speed (deg/sec). |
| MinPitchOffset / MaxPitchOffset | float | -45 / 30 | Pitch clamp (degrees). |
| bDoCollisionTest | bool | true | Enable camera collision. |
| CollisionProbeSize | float | 12.0 | Probe radius for collision tests. |
| CollisionChannel | ECollisionChannel | Camera | Trace channel for collision. |
| CollisionSmoothSpeed | float | 10.0 | How quickly the camera retracts on collision. |
| bInvertLookX / bInvertLookY | bool | false | Axis inversion. |
Properties: Config (spring-arm geometry)
Section titled “Properties: Config (spring-arm geometry)”| Property | Default | Description |
|---|---|---|
| ArmLength | 800 | Default spring-arm length (cm). |
| MinArmLength | 200 | Minimum on zoom in. |
| MaxArmLength | 2000 | Maximum on zoom out. |
| SocketOffset | (0, 0, 100) | Boom offset from the spring-arm tip (local space). |
| TargetOffset | (0, 0, 50) | Look-at offset from the vessel (local space). |
| BasePitch | -15° | Initial pitch on possession. |
| OrbitSpeed | 120 | Orbit yaw rate (deg/sec per input unit). |
Properties: Stabilization (horizon damping)
Section titled “Properties: Stabilization (horizon damping)”| Property | Default | Description |
|---|---|---|
| bStabilizeHorizon | true | Hold the horizon steady against vessel roll / pitch. |
| RollDampening | 0.7 | How much vessel roll the camera filters (0 = follow fully, 1 = perfectly level). |
| PitchDampening | 0.5 | Same, for pitch. |
| StabilizationSpeed | 5.0 | Stabilization response rate (lower = smoother but more lag). |
| bSmoothPosition | true | Apply position lag for cinematic feel. |
| PositionLag | 0.15 | Position lag (seconds): higher = smoother but more delayed. |
| MaxPositionOffset | 500.0 | Maximum position offset (cm) before snapping. |
| YawFollowSpeed | 3.0 | How quickly the camera yaw catches up to vessel heading. |
Properties: SpeedEffects (FOV / zoom out)
Section titled “Properties: SpeedEffects (FOV / zoom out)”| Property | Default | Description |
|---|---|---|
| bSpeedFOV | true | Widen FOV with speed for the “fast feel”. |
| BaseFOV | 90° | FOV at zero speed. |
| MaxSpeedFOV | 105° | FOV at MaxSpeedThreshold. |
| MaxSpeedThreshold | 30 | Speed (m/s) at which MaxSpeedFOV is reached. |
| FOVInterpSpeed | 2.0 | FOV interpolation rate. |
| bSpeedZoomOut | true | Pull spring-arm back at high speed. |
| MaxSpeedArmLengthAdd | 200 | Max additional arm length at top speed (cm). |
Blueprint API
Section titled “Blueprint API”| Function | Returns | Description |
|---|---|---|
| AddLookInput(Input) | void | Feed look input (2D). |
| AddZoomInput(Input) | void | Feed zoom input (1D). |
| InitializeForPossession() | void | Reset camera state for new possession. |
| GetCamera() | CameraComponent | Main camera. |
| GetSpringArm() | SpringArmComponent | Underlying spring arm. |
| GetCurrentFOV() | float | Current field of view. |
| GetSmoothedLocation() | FVector | Smoothed camera world location. |
| GetSmoothedRotation() | FRotator | Smoothed camera world rotation. |
SeatOccupantComponent
Section titled “SeatOccupantComponent”UDRW_SeatOccupantComponent
Purpose: Enables any pawn to occupy vessel seats. Handles seat discovery, occupation requests, and input relay.
Attach To: Any Pawn or Character.
Required Components: None.
Properties
Section titled “Properties”| Property | Type | Description |
|---|---|---|
| OnSeatEntered | Delegate (Component, Seat) | Fires when occupant enters a seat. |
| OnSeatExited | Delegate (Component, Seat) | Fires when occupant exits a seat. |
Blueprint API
Section titled “Blueprint API”| Function | Returns | Description |
|---|---|---|
| RequestOccupySeat(Seat) | void | Request to sit in a seat (sends server RPC). |
| RequestVacateSeat() | void | Request to leave current seat. |
| FindNearestSeat(Range) | VesselSeat | Find nearest unoccupied seat within range (cm). Default: 500. |
| GetCurrentSeat() | VesselSeat | Current confirmed seat. |
| GetTargetOrCurrentSeat() | VesselSeat | Handles replication delay: returns TargetSeat if CurrentSeat not yet confirmed. |
| IsInSeat() / IsInSeatOrPending() | bool | Occupation state. |
| GetCurrentVessel() | Vessel | Vessel of current seat. |
VesselPossessionComponent
Section titled “VesselPossessionComponent”UDRW_VesselPossessionComponent
Purpose: Enables any pawn to directly possess VesselPawn actors via controller swap.
Attach To: Any Pawn or Character.
Required Components: None.
Properties
Section titled “Properties”| Property | Type | Default | Description |
|---|---|---|---|
| SearchRange | float | 500.0 | Default search range for FindNearestVesselPawnDefault (cm). |
| OnVesselPossessed | Delegate | : | Fires when controller moves to vessel. |
| OnReturnedFromVessel | Delegate | : | Fires when controller returns to this pawn. |
Blueprint API
Section titled “Blueprint API”| Function | Returns | Description |
|---|---|---|
| RequestPossessVessel(VesselPawn) | bool | Possess a vessel (sends server RPC). |
| FindNearestVesselPawn(Range) | VesselPawn | Find nearest unpossessed vessel within range. |
| FindNearestVesselPawnDefault() | VesselPawn | Uses SearchRange property. |
SurfaceMaskComponent
Section titled “SurfaceMaskComponent”UDRW_SurfaceMaskComponent
Purpose: Per-actor water surface masking. Creates a proxy mesh for capture and an optional buoyancy mask box.
Attach To: Any actor that should mask the water surface (bridges, docks, platforms).
Required Components: None. Works with WaterMaskingManager.
Properties
Section titled “Properties”| Property | Type | Default | Description |
|---|---|---|---|
| MaskMesh | StaticMesh | : | Mesh defining mask shape. |
| bEnabled | bool | true | Enable / disable mask. |
| bMaskBuoyancy | bool | true | Suppress buoyancy in masked region. |
| bMaskUnderwaterEffects | bool | false | Include in cave mask for underwater shader. |
| BuoyancyMaskDepth | float | 500.0 | Depth of buoyancy mask box (cm). Min: 10. |
| ShapeBuoyancyThreshold | float | 0.25 | Per-shape coverage to mask. Range: 0–1. |
| TotalBuoyancyThreshold | float | 0.70 | Average coverage to mask all. Range: 0–1. |
Blueprint API
Section titled “Blueprint API”| Function | Returns | Description |
|---|---|---|
| SetMaskEnabled(bEnabled) | void | Toggle mask at runtime. |
WaterlineComponent
Section titled “WaterlineComponent”UDRW_WaterlineComponent
Purpose: Creates a render target-based waterline mask for per-character underwater effects. Useful in split-screen or multiplayer when each player needs an independent underwater view.
Attach To: Player characters or any actor needing individual underwater visualization.
Required Components: None.
Properties
Section titled “Properties”| Property | Type | Default | Description |
|---|---|---|---|
| bCanInteractWithWater | bool | true | Whether this waterline contributes to water interaction. |
| WaterlineCubeMesh | StaticMesh | : | Capture proxy mesh for the waterline boundary. |
| WaterlineMaskRT | RenderTarget2D | : | Output mask render target. |
| UnderwaterMaterial | MaterialInterface | : | Underwater post-process material driven by this waterline. |
The component initializes itself automatically when its owning actor becomes the local player’s view target: no Blueprint setup required.