Water

How to make objects float on stylized water in UE5 without physics

Objects can float on a custom water material in Unreal Engine 5 without physics simulation if a Blueprint evaluates the same wave formula as the shader. It samples the wave height under the object, moves it up and down and tilts it from a few sample points. That keeps boats and barrels on the waves you actually see.

By RafaSC, 3D and technical artist · Updated · 4 min read

Stylized Water material for Unreal Engine 5: the same island with different water presets

Why floating on a custom water material is awkward

Your waves live in the material: they move vertices on the GPU. Gameplay code never sees those vertices, so a plain plane looks wavy while everything on it sits on a flat surface. Unreal's own Buoyancy component belongs to the Water plugin and is built around that plugin's water bodies, not around a material you wrote for a plane.

The reliable fix is to have the same wave formula in two places: once in the shader, once in a Blueprint. The Blueprint asks "how high is the wave at this point, right now?" and places the object there.

How it rides the wave

A boat, a duck, a crate and a barrel floating on stylized water, each riding the same wave the shader draws
BP_SW_Buoyancy samples the same wave as the shader, so objects ride the waves you see.

In Stylized Water Material that Blueprint is the component BP_SW_Buoyancy. It takes five samples of the same wave, and from them it gets a height and a tilt: a boat tilts with the swell, a duck bobs, a crate rides the wave. It reads the same wave formula as the shader, so objects ride the waves you see. It does not use physics simulation.

Steps

  1. Add the component BP_SW_Buoyancy to any actor: Add Component, search "BP_SW_Buoyancy". The actor's mesh must be Movable.
  2. Add the Actor Tag SW_Water to your water plane. The component finds the nearest tagged water by itself (AutoFindWater).
  3. Press Play and tune.
SettingWhat it does
BobAmountHow much it moves up and down
TiltAmountHow much it tilts with the wave
FollowSpeedHow fast it follows the water
PontoonSpacingDistance between the sample points
FloatOffsetRaises or lowers the object in the water

Calm water or a storm

The waves themselves are set in the material: Wave Height, Wave Length, Wave Steepness, Wave Direction and Wave Speed, in group 07. The same preset goes from a flat calm to a stormy sea with two sliders.

The same coast with calm water (Wave Height 10) and a stormy sea (Wave Height 35) with foam on the crests
Same preset, two values of Wave Height and Crest Amount.

Limits

  • There is no physics simulation, so do not expect rigid-body reactions from it. It is for things that ride the water.
  • The mesh must be Movable.
  • The water plane needs the SW_Water tag, or the component has nothing to find.
  • Tested on Unreal Engine 5.8.

The water itself is covered in how to make stylized water in UE5, and rivers in river and waterfall with splines.

Frequently asked questions

Why do my objects not follow the waves of my water material?

The waves move vertices on the GPU, and gameplay code does not see them. A Blueprint has to evaluate the same wave formula as the shader and place the object at that height.

Does BP_SW_Buoyancy use physics?

No. It reads the same wave formula as the shader and moves the actor. It does not use physics simulation.

My object does not float. What did I miss?

The actor's mesh must be Movable and the water plane needs the Actor Tag SW_Water so the component can find it.

Can I change how deep the object sits?

Yes, with FloatOffset. BobAmount and TiltAmount control the movement.

Related guides

Make Objects Float on Water in UE5 Without Physics: summary image for Pinterest

Save this guide for later. Product used on this page: Stylized Water Material.