Skip to content

Components

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).

PropertyTypeDefaultDescription
Setup
WaterHeightmapRenderTargetRenderTarget2D:Heightmap RT (auto-assigned by GridManager).
WaterDepthmapRenderTargetRenderTarget2D:Depth map RT (auto-assigned by GridManager).
bEnableMultiplayerSupportbooltrueEnable replication.
bPlayableCharacterboolfalseCharacter mode (different force application).
Water properties
WaterDensityfloat1025.0Water density kg/m³. Range: 900–1100.
WaterViscosityfloat0.01Viscosity Pa·s. Range: 0.001–0.1.
InWaterThresholdfloat0.01Min submersion ratio for bIsInWater. Range: 0.001–0.5.
Simulation
UpdateModeEDRWBuoyancyUpdateModeFixedOnlyEventTick, FixedSubstep (WIP), or FixedOnly (recommended).
CalculationRateHzfloat30.0Fixed timestep rate. Range: 1–120.
InterpolationStrengthfloat0.15Smoothing between snapshots. Range: 0–1.
PhysicsQualityEDRWPhysicsQualityAsyncAsync, Mixed, or Runtime: see Physics quality modes.
InteractionHeightMultiplierfloat1.0Contribution of interaction effects (wakes, ripples) to buoyancy sampling. Set to 0 to make ripples visual-only.
Velocity limits
MaxLinearSpeedfloat50.0Max speed before damping (m/s). Range: 1–100.
MaxAngularSpeedfloat10.0Max angular speed (rad/s). Range: 0.5–20.
VelocityDampingStrengthfloat0.1Damping aggressiveness. Range: 0.01–1.
Rotational damping
PitchRollDampingMultiplierfloat1.0Multiplier on pitch/roll damping.
YawDampingMultiplierfloat1.0Multiplier on yaw damping.
Heave damping
bEnableHeaveDampingbooltrueVertical oscillation damping.
HeaveDampingCoefficientfloat0.7Fraction of critical damping. Range: 0.1–2.
HeaveAddedMassCoefficientfloat1.0Vertical added mass. Range: 0.3–2.
HeaveVelocityThresholdfloat5.0Below this vertical speed (cm/s), heave damping tapers off. Range: 0.5–30.
Lateral added mass
bEnableLateralAddedMassbooltrueApply added-mass effects to surge and sway motion (resists drifting and longitudinal acceleration).
SurgeAddedMassCoefficientfloat0.1Forward / backward added-mass fraction. Typically small (streamlined hulls 0.05–0.15, blunt objects up to 0.5).
SwayAddedMassCoefficientfloat0.8Sideways added-mass fraction. Typically large for ship hulls: this is the main “doesn’t slide sideways” knob.
Slamming
bEnableSlammingbooltrueImpact forces when entering water.
SlammingCoefficientfloat1.0Slamming intensity. Range: 0.1–5.
SlammingVelocityThresholdfloat5.0Min vertical speed for slam (cm/s). Range: 10–500.
bEnableExitDampingbooltrueDamp exit velocity when a hull breaches above the surface to avoid unrealistic ejection.
ExitDampingRatiofloat0.7Fraction of vertical velocity preserved when exiting. Range: 0.1–1.
Advanced
bEnablePredictionbooltruePredict water heights one frame ahead: smoother buoyancy on remote clients.
HeightmapHistorySizeint324Snapshot buffer depth used for prediction.
FunctionReturnsDescription
CalculateBuoyancyOutput()voidForce recalculation.
GetInterpolatedOutput(BodyIndex)BuoyancyOutputPer-body interpolated state.
IsInWaterBody()boolTrue if in a discrete water body.
GetWaterBody()WaterBodyCurrent overlapping water body.
DelegateSignatureFires 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.


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).

PropertyTypeDefaultDescription
TargetComponentNameFName:Name of the mesh component to attach shapes to.
MainMaterialTypeEDRW_MaterialTypeWoodDefault material (determines density).
bEnableWaterInteractionbooltrueGenerate water interaction effects from this body.
BoxesArray<BoxShape>:Box collision shapes.
SpheresArray<SphereShape>:Sphere collision shapes.
CapsulesArray<CapsuleShape>:Capsule collision shapes.
bUseCustomCenterOfMassboolfalseUse shape-based CoM instead of physics engine CoM.
CenterOfMassOffsetFVector(0,0,0)Manual CoM offset.
Interaction override
bOverrideInteractionBoundsboolfalseOverride auto-derived bounds.
InteractionRadiusfloat100.0Override radius (cm).
InteractionHullLengthfloat200.0Override hull length (cm).
InteractionHullWidthfloat100.0Override hull width (cm).
FunctionReturnsDescription
DebugDrawShapes()voidDraw shape wireframes.

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: Radius and HalfHeight (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.


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.

PropertyTypeDefaultDescription
Core
bEnableSmoothingbooltrueMaster enable.
bUsePollBasedDetectionbooltruePoll for state changes vs explicit notification.
Timing
InterpolationRelativeTimefloat0.1Render delay from owner time (seconds). Range: 0–0.5.
TimeSmoothingfloat2.0Time offset smoothing (seconds). Range: 0–5.
SendRateHzfloat30.0Expected send rate. Range: 1–120.
bUseHermiteInterpolationbooltrueHermite spline for smoother curves.
Lerp
PositionLerpSpeedfloat0.85Position lerp per frame. Range: 0–1.
RotationLerpSpeedfloat0.85Rotation lerp per frame. Range: 0–1.
ScaleLerpSpeedfloat0.85Scale lerp per frame. Range: 0–1.
VelocitySmoothingRatefloat10.0Smoothing rate for the calculated velocity outputs (per second). Range: 1–30.
Thresholds
ReceivedPositionThresholdfloat0.0Drop position updates that differ by less than this (cm). Set to 0 to always update.
ReceivedRotationThresholdfloat0.0Drop rotation updates that differ by less than this (degrees). Set to 0 to always update.
Extrapolation
bEnableExtrapolationbooltrueExtrapolate when buffer runs out.
ExtrapolationTimeLimitfloat0.5Max extrapolation time (seconds). Range: 0–2.
ExtrapolationDistanceLimitfloat500.0Max extrapolation distance (cm).
Snap
PositionSnapThresholdfloat500.0Snap if error exceeds this (cm). 0 = disabled.
RotationSnapThresholdfloat90.0Snap if angle exceeds this (degrees).
FunctionReturnsDescription
ReceiveNetworkState(…)voidFeed a new state from the network.
NotifyReplicatedMovementUpdate()voidNotify that replicated movement changed (poll mode).
SnapToReplicatedTransform()voidInstant snap.
ClearBuffer()voidClear state buffer.
Teleport()voidMark next transition as teleport.
GetSmoothedTransform()FTransformCurrent interpolated transform.
IsSmoothing() / IsExtrapolating()boolState queries.
GetJitterStats()JitterStatsNetwork jitter metrics.
GetInterpolationTime()floatCurrent interpolation render-time offset.
GetOwnerTime()floatOwner-time at the latest received state.

These are written each tick and useful for animation / audio / HUD:

PropertyTypeDescription
CalculatedVelocityFVectorLinear velocity derived from smoothed transform.
CalculatedAngularVelocityFVectorAngular velocity derived from smoothed transform.
CalculatedAccelerationFVectorLinear acceleration.
CalculatedSpeedfloatLinear speed (cm/s).
CalculatedAngularSpeedfloatAngular speed magnitude.
DelegateSignatureFires 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.


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.

PropertyTypeDefaultDescription
CalculationRateHzfloat30.0Fixed timestep rate. Range: 1–120.
InterpolationStrengthfloat0.85Force smoothing. Range: 0–1.
ForceMultiplierfloat1.0Global force scale. Range: 0.1–10.
TurnAssistMultiplierfloat1.0Yaw torque boost. Range: 1–50. Default 1.0 is physically accurate; large vessels often need 5–20.
TrueWindVelocityFVector(0,0,0)World wind for sail calculations (cm/s).
bEnableWindagebooltrueAir resistance calculation.
WindageFrontalAreafloat0.0Frontal area for air drag (cm²).
WindageLateralAreafloat0.0Lateral area for crosswind drag (cm²).
WindageDragCoefficientfloat0.8Multiplier on computed windage forces.
FunctionReturnsDescription
Initialize(VesselData, PhysicsRoot, Buoyancy)voidInitialize with data.
SetInput(VesselInput)voidApply control input.
GetMovementOutput()VesselMovementOutputLatest computed movement output (forces, state, lift).
GetMovementState()MovementStateDisplacement, Transition, Planing, or Foiling.
GetPropulsionState(Index, OutState)boolPer-propulsion live state (RPM, throttle, thrust). False if index invalid.
GetControlSurfaceState(Index, OutState)boolPer-control-surface live state (deflection, lift, stalled).
GetSpeed() / GetSpeedKnots()floatCurrent speed.
GetFroudeNumber()floatHull Froude number.
IsPlaning() / IsFoiling()boolState queries.
SetWindVelocity(WindCmPerSec)voidSet wind for sails.
GetApparentWind()FVectorApparent wind relative to vessel.
DelegateSignatureFires 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.


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.

PropertyTypeDefaultDescription
InputSourceEDRW_VesselInputSourceAutoKeyboardMouseAuto keyboard, auto gamepad, auto both, custom config, or custom actions.
InputConfigVesselInputConfig:Custom input config data asset.
InputSmoothingfloat0.0Analog smoothing. Range: 0–0.99.
DeadZonefloat0.1Analog dead zone. Range: 0–0.5.
InputSendRatefloat30.0Client→server send rate (Hz). Range: 1–60.
InputChangeTolerancefloat0.01Min change to trigger send. Range: 0.001–0.1.
bSendPeriodicFullStatebooltruePeriodic full state for reliability.
Camera
bInvertCameraYboolfalseInvert Y axis.
CameraLookSensitivityfloat1.0Look sensitivity. Range: 0.1–5.
CameraZoomSensitivityfloat1.0Zoom sensitivity. Range: 0.1–5.
FunctionReturnsDescription
GetLocalInput()VesselInputCurrent local input state.
IsProcessingInput()boolTrue if input is active.
ForceReplicateInput()voidForce 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.


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.

PropertyTypeDefaultDescription
ZoomSpeedfloat500.0Arm length change per second per unit of input.
LookSensitivityfloat0.5Look input multiplier.
RecenterSpeedfloat1.0Camera recenter speed (deg/sec).
MinPitchOffset / MaxPitchOffsetfloat-45 / 30Pitch clamp (degrees).
bDoCollisionTestbooltrueEnable camera collision.
CollisionProbeSizefloat12.0Probe radius for collision tests.
CollisionChannelECollisionChannelCameraTrace channel for collision.
CollisionSmoothSpeedfloat10.0How quickly the camera retracts on collision.
bInvertLookX / bInvertLookYboolfalseAxis inversion.
PropertyDefaultDescription
ArmLength800Default spring-arm length (cm).
MinArmLength200Minimum on zoom in.
MaxArmLength2000Maximum 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.
OrbitSpeed120Orbit yaw rate (deg/sec per input unit).

Properties: Stabilization (horizon damping)

Section titled “Properties: Stabilization (horizon damping)”
PropertyDefaultDescription
bStabilizeHorizontrueHold the horizon steady against vessel roll / pitch.
RollDampening0.7How much vessel roll the camera filters (0 = follow fully, 1 = perfectly level).
PitchDampening0.5Same, for pitch.
StabilizationSpeed5.0Stabilization response rate (lower = smoother but more lag).
bSmoothPositiontrueApply position lag for cinematic feel.
PositionLag0.15Position lag (seconds): higher = smoother but more delayed.
MaxPositionOffset500.0Maximum position offset (cm) before snapping.
YawFollowSpeed3.0How quickly the camera yaw catches up to vessel heading.
PropertyDefaultDescription
bSpeedFOVtrueWiden FOV with speed for the “fast feel”.
BaseFOV90°FOV at zero speed.
MaxSpeedFOV105°FOV at MaxSpeedThreshold.
MaxSpeedThreshold30Speed (m/s) at which MaxSpeedFOV is reached.
FOVInterpSpeed2.0FOV interpolation rate.
bSpeedZoomOuttruePull spring-arm back at high speed.
MaxSpeedArmLengthAdd200Max additional arm length at top speed (cm).
FunctionReturnsDescription
AddLookInput(Input)voidFeed look input (2D).
AddZoomInput(Input)voidFeed zoom input (1D).
InitializeForPossession()voidReset camera state for new possession.
GetCamera()CameraComponentMain camera.
GetSpringArm()SpringArmComponentUnderlying spring arm.
GetCurrentFOV()floatCurrent field of view.
GetSmoothedLocation()FVectorSmoothed camera world location.
GetSmoothedRotation()FRotatorSmoothed camera world rotation.

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.

PropertyTypeDescription
OnSeatEnteredDelegate (Component, Seat)Fires when occupant enters a seat.
OnSeatExitedDelegate (Component, Seat)Fires when occupant exits a seat.
FunctionReturnsDescription
RequestOccupySeat(Seat)voidRequest to sit in a seat (sends server RPC).
RequestVacateSeat()voidRequest to leave current seat.
FindNearestSeat(Range)VesselSeatFind nearest unoccupied seat within range (cm). Default: 500.
GetCurrentSeat()VesselSeatCurrent confirmed seat.
GetTargetOrCurrentSeat()VesselSeatHandles replication delay: returns TargetSeat if CurrentSeat not yet confirmed.
IsInSeat() / IsInSeatOrPending()boolOccupation state.
GetCurrentVessel()VesselVessel of current seat.

UDRW_VesselPossessionComponent

Purpose: Enables any pawn to directly possess VesselPawn actors via controller swap.

Attach To: Any Pawn or Character.

Required Components: None.

PropertyTypeDefaultDescription
SearchRangefloat500.0Default search range for FindNearestVesselPawnDefault (cm).
OnVesselPossessedDelegate:Fires when controller moves to vessel.
OnReturnedFromVesselDelegate:Fires when controller returns to this pawn.
FunctionReturnsDescription
RequestPossessVessel(VesselPawn)boolPossess a vessel (sends server RPC).
FindNearestVesselPawn(Range)VesselPawnFind nearest unpossessed vessel within range.
FindNearestVesselPawnDefault()VesselPawnUses SearchRange property.

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.

PropertyTypeDefaultDescription
MaskMeshStaticMesh:Mesh defining mask shape.
bEnabledbooltrueEnable / disable mask.
bMaskBuoyancybooltrueSuppress buoyancy in masked region.
bMaskUnderwaterEffectsboolfalseInclude in cave mask for underwater shader.
BuoyancyMaskDepthfloat500.0Depth of buoyancy mask box (cm). Min: 10.
ShapeBuoyancyThresholdfloat0.25Per-shape coverage to mask. Range: 0–1.
TotalBuoyancyThresholdfloat0.70Average coverage to mask all. Range: 0–1.
FunctionReturnsDescription
SetMaskEnabled(bEnabled)voidToggle mask at runtime.

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.

PropertyTypeDefaultDescription
bCanInteractWithWaterbooltrueWhether this waterline contributes to water interaction.
WaterlineCubeMeshStaticMesh:Capture proxy mesh for the waterline boundary.
WaterlineMaskRTRenderTarget2D:Output mask render target.
UnderwaterMaterialMaterialInterface: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.