Tidal 2 URP

Whirlpools

What it is

TidalWhirlpool adds a vortex to the water: a swirling current that carries foam and floating objects round and in, a funnel pit, spiral arms and foam threads. Height, slope and current are all available to scripts and buoyancy. Up to 8 whirlpools render at once.

WhirlpoolFlowEmitter was renamed to TidalWhirlpool in v2.2. Existing references are kept.

How to add it

GameObject > Tidal 2 > Whirlpool, or the body’s Place Water Features tool. The default is a large maelstrom (Radius 578 m, Core Radius 302.3 m, Strength 93.7) - set Radius and Core Radius to the area it should cover and lower Strength for anything smaller than open sea.

In the editor

Whirlpool inspector

Screenshot: the Tidal Whirlpool component. Vortex - Radius 578, Strength 93.7, Core Radius 302.3, Flow Speed 3, Inward Bias 0.15, Clockwise (off). Surface - Funnel Depth 0.231. Spiral Arms - Arms 4, Arm Height 0.382, Arm Width 0.45, Arm Winding 1.77, Arm Wander

  1. Detail - Churn 1. Foam - Foam 2.
Whirlpool in the Scene view

Screenshot (Scene view, Demo_BreakingWaves): looking down on the big default whirlpool (Radius 578 m), selected: two broad white spiral foam arms wind around a darker, smooth funnel in the middle of a deep blue sea, with the move/rotate gizmo at its centre.

Big whirlpool in play mode

Screenshot (Game view, Demo_BreakingWaves): the same maelstrom from the air: a huge dark funnel with sparkling white foam arms curling into it.

Smaller whirlpool in play mode

Screenshot (Game view, Demo_BreakingWaves): a 140 m whirlpool (Core Radius 8.4 m) in rough sea: a tight spiral of foam drawing into a small eye, with breaking crests around it.

FieldMeaning
RadiusInfluence radius (m)
Core RadiusEye radius (m)
StrengthPeak swirl speed at the core (m/s); also deepens the funnel (capped at 0.6 x Radius)
Flow SpeedMultiplier on the current only (how fast things are carried)
Inward BiasHow much the current pulls inward vs. round
ClockwiseSpin direction seen from above
Funnel DepthPit depth scale
Arms / Arm Height / Width / Winding / WanderThe spiral arms
Churn, FoamSurface detail and foam amount

For a smooth funnel turn on the body’s Tessellation (Target Edge ~0.1 m, Max Factor 32-64).

Scripting

Settings are read-only at runtime (tune in the Inspector; editor scripts use SerializedObject with _radius, _strength, _coreRadius, _flowSpeed, _funnelDepth, _arms).

float radius = pool.Radius, eye = pool.CoreRadius;
float pit = pool.FunnelDepthMetres;
float peakCurrent = pool.FlowStrength;     // Strength x FlowSpeed
bool cw = pool.Clockwise;
float h = TidalWhirlpool.HeightAt(x, z, TidalWhirlpool.ShaderTime);
Vector2 slope = TidalWhirlpool.SlopeAt(x, z, TidalWhirlpool.ShaderTime);
Vector2 flow = body.GetWaterFlow(pos);     // includes the swirl

Common issues

SymptomCauseFix
Faceted funnel/armsMesh too coarseTessellation on, high-res settings
Seabed or hole at the eyeWater shallower than the funnelDeeper water, or lower Strength/Funnel Depth
Funnel stops deepeningCapped at 0.6 x RadiusRaise Radius
Foam races round too fastCurrent follows StrengthLower Flow Speed
No spiral foamArms or Foam is 0Raise them
Wrong spinClockwiseToggle
9th whirlpool does nothingMax 8Remove or merge