How to use the new water system (4.26)

In this tutorial we will take a look at the new water system in UE4 4.26, at the time of writing this, it’s still in preview and not recommended to be used in production.

1. Make sure the plugin is enabled (restart editor required)

2. To make it work on a new created landscape, make sure to enable edit layers when creating it

3. However if you already have an existing landscape, you can click on it and then enable edit layers on it

4. Now simply add a lake or river or whatever water pre-set you with to use

5. Looks cool, but in order to swim in it, you need to implement swimming functionality, luckily FPS Game Starter Kit has it for years now, so just call those events on overlap with the new water

6. Still on the character, add this inside the Capsule Trace for Smooth Crouch function.

NOTE: using a cast there because apparently the collision profile on the water can’t be changed, so I assume it blocks the visibility channel by default, so the cast is there to tell it that if hit the water, it didn’t hit anything, basically lying that the return value is false. Alternative is to create a new variable for actors to ignore, then a new function that would add the inventory, as well as the water bodies (would need to use geta ll actors of class and loop it into the array variable), then connect it there in actors to ignore, but the cast is easier.

That’s it!