The runtime API any gameplay code can call to ask a water body for surface height, normal, depth, flow velocity and immersion at a world position.
Almost every water gameplay problem collapses into one question asked at a world position: where is the surface, which way does it face, how deep is the water, how fast is it moving, and is this point under it. Oceanology answers all five through a single query on the water component, and the same call works whether the component underneath is a river, a lake, an ocean or a custom body. The answer is assembled from the spline metadata, the terrain below, the active wave source, and where one covers the point, the live or baked shallow water simulation.
A query declares up front what it wants through EOceanologyWaterBodyQueryFlags, so you never pay for a depth resolve you are not going to read. The component adjusts the set for you: asking for depth or immersion implies location, and asking for waves on a body that has them implies location and depth.
Get Water Surface Info At Location is the Blueprint node on UOceanologyWaterComponent. It takes a world location and an Include Depth switch, and returns the water surface location, the surface normal, the water velocity and the water depth. It returns false when the point falls inside a water exclusion volume, and zeroes its outputs in that case, so a caller that ignores the return value still reads as out of water. Around it sit the smaller nodes: Get Max Wave Height, Get Water Velocity At Spline Input Key, Get Water Velocity Vector At Spline Input Key, Get Audio Intensity At Spline Input Key, Get Islands and Get Exclusion Volumes.
TryQueryWaterInfoClosestToWorldLocation takes the world location, the flag set, and an optional precomputed spline key, and returns a TValueOrError. The error side is typed: WaterBodyNotRegistered for a component that is not yet registered with its actor, NullWaterSplineMetadata for the narrow window before registration completes. The result exposes plane and surface variants of location, normal and depth, plus immersion depth, IsInWater, velocity, the wave info struct and IsInExclusionVolume. Each accessor asserts that the matching flag was requested, so a mismatched flag set fails loudly instead of returning a plausible zero.
| Before | Oceanology Pro | |
|---|---|---|
| Query failure | QueryWaterInfoClosestToWorldLocation returned a filled struct with no way to signal an unusable body | TryQueryWaterInfoClosestToWorldLocation returns a TValueOrError with a typed error the caller must handle |
| Spline flow data | A vector curve stored per spline point | A scalar curve applied along the spline tangent, so width and direction edits do not invalidate flow |
| Niagara binding | Set Water Body took the water actor | Set Oceanology Water Component takes the component, which is what the query actually lives on |
| Query flags | 8, combinable |
| Water body types answered | 4 - River, Lake, Ocean, Custom |
| Blueprint node | Get Water Surface Info At Location - location in, 4 outputs plus a depth switch |
| Spline point defaults | Depth 150 cm, River Width 2048 cm, Velocity 128, Audio Intensity 1 |
| Ocean depth fallback | r.Oceanology.OceanFallbackDepth, 3000 cm |
| Generic depth fallback | r.Oceanology.FallbackDepth, 3000 cm |
| Flow encoded in the Water Info texture | capped by r.Oceanology.MaxFlowVelocity, 1024 cm/s |
| Shallow water wet/dry threshold | 0.01 cm |
| Repeat-query optimisation | r.Oceanology.UseSplineKeyOptimization, on by default |
This is one entry on the Galidar roadmap. For what already shipped in each release, see the Changelog.