Log inGet started
World

Tidewater: Oceans, Lakes, Rivers, Waterfalls, Swimming and Splashes Water Kit

Branchmain
Commit431c1b9967

README.md

tide

The tide for Tidewater water: a sea, shoreline or lake whose level rises and falls on the session's shared water clock (Physics.waterTime()), so every player sees the same water at the same height and a player who joins late sees the tide where everyone else does.

Any water takes it through its tide option: a number is the range in metres (high water to low water, one cycle every 10 minutes), a table names range, period (seconds) and phase (0..1). The water follows in 2 cm steps, so a slow tide re-declares its physics only every few seconds.

local Tide = require("tidewater.modules.tide")
local spec = Tide.spec({ range = 2.5, period = 900 })
local now = Tide.at(spec)          -- { offset = metres, rising, high, low }

Game code normally reads the result through Water.tideAt(x, z) or a WaterBody's tideNow(), which answer for the water there.