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
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
- Detail - Churn 1. Foam - Foam 2.
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.
Screenshot (Game view, Demo_BreakingWaves): the same maelstrom from the air: a huge dark funnel with sparkling white foam arms curling into it.
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.
| Field | Meaning |
|---|---|
| Radius | Influence radius (m) |
| Core Radius | Eye radius (m) |
| Strength | Peak swirl speed at the core (m/s); also deepens the funnel (capped at 0.6 x Radius) |
| Flow Speed | Multiplier on the current only (how fast things are carried) |
| Inward Bias | How much the current pulls inward vs. round |
| Clockwise | Spin direction seen from above |
| Funnel Depth | Pit depth scale |
| Arms / Arm Height / Width / Winding / Wander | The spiral arms |
| Churn, Foam | Surface 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
| Symptom | Cause | Fix |
|---|---|---|
| Faceted funnel/arms | Mesh too coarse | Tessellation on, high-res settings |
| Seabed or hole at the eye | Water shallower than the funnel | Deeper water, or lower Strength/Funnel Depth |
| Funnel stops deepening | Capped at 0.6 x Radius | Raise Radius |
| Foam races round too fast | Current follows Strength | Lower Flow Speed |
| No spiral foam | Arms or Foam is 0 | Raise them |
| Wrong spin | Clockwise | Toggle |
| 9th whirlpool does nothing | Max 8 | Remove or merge |