Skip to main content

Riverology — Swimming

Last updated: 2025-12-09

Prerequisites

  • Unreal Engine 5.6 or newer.
  • Riverology installed and configured (see the Setup page).
  • At least one BP_Riverology river spline placed in your level.
  • A Character Blueprint with a Character Movement Component.
  • Basic familiarity with Physics Volumes, Blueprints, and Enhanced Input in Unreal Engine.

Notes

  • Swimming in Riverology is implemented using a Physics Volume that defines the swimmable area. When a character enters this volume, the Character Movement Component automatically switches to swimming mode.
  • The system requires linking the Physics Volume to BP_Riverology so the river can track which volume represents its swimmable region.
  • For full swimming functionality with vertical movement (swim up/down), you need to implement Blueprint logic using Enhanced Input Actions.

Step-by-step

1. Select the BP_Riverology actor in your scene

Open your level and locate the BP_Riverology actor. Use the Outliner search box to quickly find it by typing BP_Riverology.

Select the actor to access its properties in the Details panel.

Select BP_Riverology in Outliner

2. Add a Physics Volume to your scene

Use the Quickly Add to the Project menu (the + button in the toolbar) and search for Phy to filter the available actors.

Select Physics Volume from the list and drag it into your scene. Position it so that it encompasses the area of the river where you want swimming to be enabled.

The Physics Volume defines the 3D region where the character's movement mode will switch to swimming.

Add Physics Volume from menu

3. Link the Physics Volume to BP_Riverology

With BP_Riverology selected, scroll through the Details panel to find the Swimming category.

Locate the Swim Volume property and use the dropdown to select the PhysicsVolume actor you just added to your scene. This linkage tells Riverology which volume represents the swimmable area for this river.

Swimming category with Swim Volume property

4. Configure the Physics Volume for swimming

Select the PhysicsVolume actor in the Outliner. In the Details panel, configure the following settings:

Transform:

  • Position and scale the volume to cover your river's swimmable area.
  • Set Mobility to Movable if the volume needs to follow a moving water body.

Character Movement:

  • Terminal Velocity — Maximum falling speed in the volume (default: 4000.0).
  • Priority — Volume priority when overlapping with other physics volumes (default: 0).
  • Fluid Friction — Resistance applied to character movement (default: 0.5). Higher values slow the character more.
  • Water Volume — ✅ Enable this checkbox. This is critical — it tells the Character Movement Component to switch to swimming mode.

Volume:

  • Physics on Contact — Leave unchecked unless you need physics actors to react to entering the volume.

Physics Volume configuration

5. Review the Actor settings

In the Actor category of the Physics Volume, note the following settings:

  • Spawn Collision Handling Method — Set to Always Spawn, Ignore Collisions for reliable volume placement.
  • Initial Life Span — Set to 0.0 for a persistent volume (never destroyed).

These settings ensure the Physics Volume remains active throughout gameplay.

Actor category settings


Blueprint Implementation

To enable vertical swimming (swim up/down with input), you need to implement Blueprint logic in your Character.

6. Implement the Swimming input logic

Open your Character Blueprint and create the swimming input handling logic. The system uses Enhanced Input Actions for swim controls:

Key nodes:

  • EnhancedInputAction IA_SwimUp — Triggered when the player presses the swim up input.
  • EnhancedInputAction IA_SwimDown — Triggered when the player presses the swim down input.
  • Get Physics Volume — Retrieves the current physics volume the character is in.
  • Water Volume — Boolean check to verify the character is in a water volume.
  • Add Movement Input — Applies vertical movement with World Direction (0.0, 0.0, 0.5) for up or (0.0, 0.0, -0.5) for down.

The logic flow:

  1. Check if the swim input is triggered.
  2. Verify the character is inside a Water Volume.
  3. Apply vertical movement input based on the action (up or down).

Swimming Blueprint logic

7. Get the Riverology reference at BeginPlay

In your Character Blueprint, set up the Riverology reference on Event BeginPlay:

Implementation steps:

  1. Add a Sequence node after Event BeginPlay.
  2. Use Get All Actors Of Class with BP_Riverology as the Actor Class.
  3. Get the first element (index 0) from the Out Actors array.
  4. Store it in a variable named Riverology for later use.

Additional initialization (optional):

  • VSync — Call this function if you need vertical synchronization with the river surface.
  • Input Mapping — Set up input mapping context for swimming controls.

This reference allows your character to query the river for surface height, flow direction, and other properties during swimming.

Get Riverology reference Blueprint


Physics Volume Settings Reference

ParameterDefaultDescription
Terminal Velocity4000.0Maximum falling speed within the volume
Priority0Volume priority for overlapping volumes
Fluid Friction0.5Movement resistance (0.0 = none, 1.0 = maximum)
Water VolumefalseEnables swimming mode for characters
Physics on ContactfalseTriggers physics events on actor contact

Troubleshooting Common Issues

ProblemLikely CauseSolution
Character doesn't swimWater Volume not enabledEnable Water Volume checkbox on Physics Volume
Character sinks immediatelyFluid Friction too lowIncrease Fluid Friction value
Swim up/down not workingInput Actions not configuredVerify Enhanced Input Actions are properly set up
Swimming only works in part of riverPhysics Volume too smallScale the Physics Volume to cover entire river
Character stuck in swimming modePhysics Volume extends outside waterResize volume to match water bounds
Riverology reference is nullBP_Riverology not in levelEnsure BP_Riverology exists before BeginPlay

Summary

In this guide, you learned how to:

  1. Add a Physics Volume — Create the swimmable region for your river.
  2. Link the volume to Riverology — Connect the Physics Volume to BP_Riverology via the Swim Volume property.
  3. Configure swimming physics — Set up Fluid Friction, Terminal Velocity, and enable Water Volume.
  4. Implement swim controls — Create Blueprint logic for vertical swimming using Enhanced Input.
  5. Get the Riverology reference — Store the river reference for runtime queries.

With this setup, characters can swim in your Riverology rivers with full vertical movement control.