Pawns
VesselPawn
Section titled “VesselPawn”ADRW_VesselPawn: abstract; subclass to a Blueprint to instantiate.
Purpose: Pawn wrapper for direct player possession of vessels. Combines all vessel components with Enhanced Input and camera.
How to possess
Section titled “How to possess”Use VesselPossessionComponent on your player pawn, call RequestPossessVessel(VesselPawn). Or use APlayerController::Possess() directly on the server.
Custom controllers (AI)
Section titled “Custom controllers (AI)”VesselPawn implements IDRW_VesselController, the interface DRW uses to read input from whatever is driving a vessel. To write your own controller (for AI ships, scripted boats, etc.) you can either:
- Drive the existing pawn by feeding
SetInput()on the vessel (simplest, works from Blueprint). - Implement
IDRW_VesselControlleryourself for a non-pawn driver. The interface’s input methods are pure C++ virtuals, so a custom controller class must be written in C++: Blueprint-only classes cannot satisfy the interface in this version.
Default input (AutoKeyboardMouse)
Section titled “Default input (AutoKeyboardMouse)”| Key | Action |
|---|---|
| W / S | Throttle |
| A / D | Steering |
| Mouse | Camera look |
| Scroll | Camera zoom |
Customize by setting InputSource on VesselInputComponent or providing a VesselInputConfig.
Owned components
Section titled “Owned components”- HullMesh (StaticMeshComponent): root, physics-simulating
- PhysicsBody (PhysicsBodyComponent)
- Buoyancy (BuoyancyComponent)
- Movement (VesselMovementComponent)
- Replication (SmoothReplicationComponent)
- VesselInput (VesselInputComponent)
- VesselCamera (VesselCameraComponent)
Properties
Section titled “Properties”| Property | Type | Default | Description |
|---|---|---|---|
| VesselData | VesselDataAsset | : | Master config (required before BeginPlay). |
| HullMeshAsset | StaticMesh | : | Hull mesh. |
| bEnableMultiplayer | bool | true | Network support. |
| NetUpdateRate | float | 30.0 | Hz. Range: 1–60. |
| OriginalPawn | Pawn | : | Pawn to return to on exit (auto-set). |
Blueprint API
Section titled “Blueprint API”| Function | Returns | Description |
|---|---|---|
| Server_RequestExitVessel() | void | Exit vessel, return to OriginalPawn (Server RPC). |
| GetSpeed() / GetSpeedKnots() | float | Speed. |
| GetHeading() | float | 0–360 heading. |
| IsInWater() / IsPlaning() | bool | State. |
| GetHullMesh / PhysicsBody / Buoyancy / Movement / VesselInput / VesselCamera / Replication() | Component | Component access. |
Multiplayer: Server-authoritative. Input replicated. OriginalPawn replicated with RepNotify.
DronePawn
Section titled “DronePawn”ADRW_DronePawn
Purpose: Flying camera pawn for testing vessel possession, seat occupation, and ocean wave switching. Use this as your default pawn during development.
How to possess
Section titled “How to possess”Set as the default pawn in your GameMode (use BP_DRWGameMode).
| Key | Action |
|---|---|
| WASD | Fly |
| Mouse | Look |
| E / Q | Up / Down |
| Shift | Sprint |
| F | Interact (possess vessel or enter seat) |
| 1 / 2 / 3 | Switch ocean wave presets |
Owned components
Section titled “Owned components”- CollisionSphere, SpringArm, Camera, FloatingPawnMovement
- SeatOccupant (SeatOccupantComponent)
- VesselPossession (VesselPossessionComponent)
- WaterlineComponent
States
Section titled “States”Flying, ControllingVessel
Properties
Section titled “Properties”| Property | Type | Default | Description |
|---|---|---|---|
| FlySpeed | float | 1000.0 | Normal speed (cm/s). |
| SprintSpeed | float | 3000.0 | Sprint speed (cm/s). |
| LookSensitivity | float | 0.5 | Look sensitivity. |
| SeatInteractionRange | float | 500.0 | Seat discovery range (cm). |
| SmallWavesData | WaveDataAsset | : | Key 1 wave preset. |
| MediumWavesData | WaveDataAsset | : | Key 2 wave preset. |
| HighWavesData | WaveDataAsset | : | Key 3 wave preset. |
| WaveBlendDuration | float | 10.0 | Blend time (seconds). |
Blueprint API
Section titled “Blueprint API”| Function | Returns | Description |
|---|---|---|
| TryEnterNearestSeat() | bool | Find and enter nearest seat. |
| ExitCurrentSeat() | bool | Leave current seat. |
| TryPossessNearestVessel() | bool | Possess nearest VesselPawn. |
| ToggleVesselControl() | void | F key: tries possession first, then seat. |
| GetDroneState() | DroneState | Flying or ControllingVessel. |
| GetControlledVessel() | Vessel | Current vessel. |