Waves
The wave function: Gerstner waves, shared by the renderer (client) and the physics (both sides). It is deterministic in the settings, the weather state and server time, so a height sampled on the server matches the surface a client sees.
Each weather compiles to a set of six waves plus its look. The sea at a point is a weighted sum of whole sets (zones cross-fading at their rims, the global weather for the rest, and two sets while a weather is transitioning), never a blend of wave parameters.
Properties
SeaLevel
Waves.SeaLevel: numberThe SeaLevel setting, cached.
Sets
Waves.Sets: {[string]: Set}Compiled wave sets by weather name.
Version
Waves.Version: numberIncrements every time the sets are recompiled.
Functions
MeshAvailable
Waves.MeshAvailable() → boolean
Whether this experience may create EditableMeshes. When it may not, the sea falls back to a
flat surface at SeaLevel (as if FlatSea were on) and the wave mesh is never built.
Refresh
Waves.Refresh() → ()Recompiles every weather into wave sets from the current settings and weather state. Runs automatically whenever a setting or the weather changes.
RefreshObstacles
Waves.RefreshObstacles() → ()Re-reads every OceanObstacle in the workspace. Runs twice a second on its own.
ObstaclesNear
Waves.ObstaclesNear(x: number?,z: number?,radius: number?) → {any}Obstacles whose calming ring touches the circle (x, z, radius); with no arguments, all of them.
Damp
The wave multiplier at (x, z) from the given obstacles: 1 in open water, down to
1 - OceanCalmness against an obstacle, easing across its shore ring.
Time
Waves.Time() → numberThe synced wave clock: server time times TimeScale, or 0 while StaticWaves is on.