In this section, we’ll go over which systems Easy Swimming System is compatible with, and how to properly integrate it with them.


Game Animation Sample Project

The Game Animation Sample Project (GASP) is an official Unreal Engine example that showcases modern character animation workflows, including Animation Blueprints and modular animation setups, making it a useful reference and start point for production-quality projects. You can find the project on its official documentation page.

Integrating Easy Swimming System with GASP is quite straightforward. You mainly need to handle a few edge cases and you’re good to go.

First, make sure to follow the Setup Guide to get the swimming system working (make sure you are using the animations provided for the GASP skeleton).

Once everything is set up, the system should already work partially. To make it fully functional, we need to take care of two GASP features that don’t fully align with the swimming system: Strafing, Aiming and Crouching.

To achieve this, we’ll use one of the event dispatchers provided by the BPAC_Swimming actor component: OnStartSwimmingDispatcher. We’ll bind a new event to it (OnStartSwimming), which will allow us to adjust GASP’s behavior as soon as the character starts swimming. Make sure this bind is set up at the start of the BeginPlay event to ensure optimal behavior.

image.png

Disabling Strafing

As mentioned in the Easy Swimming System page description, the system is designed around smooth rotation movement and does not use strafing by design. Because of this, strafing should be disabled while the character is swimming while using GASP, which fortunately we can do easily!

Firstly, we’ll use the OnStartSwimming event and add the following logic to disable strafing if the character is currently using it when the character starts swimming.

image.png

And lastly, find where strafing input is handled in your character…

image.png

…and update it to match the following setup.

image.png

This setup uses a Select node driven by the IsSwimming variable from the BPAC_Swimming actor component to enable or disable strafing input depending on whether the character is swimming.