s&
About
The Project
infoAbout s&box mapRoadmap monitoringMetricsEngine startup and usage numbers
Updates
newspaperLatest News published_with_changesChangesRelease-by-release changelog
Games
Browse Games Discover Games
gamejams
Workshop
Playable
sports_esportsGamesStandalone games and gamemodes
Assets
landscapeMaps view_in_arModels textureMaterials apparelClothing
appsEverythingEvery asset type in one list
Forum
Learn
Documentation
rocket_launchGetting Started docsDocumentation apiAPI Reference
Resources
schoolTutorials manage_searchCode Search
Get s&box
Sign in with Steam
Api
Components
WaterOverlay
chevron_left Components
class
WaterOverlay

Constructors

functionsWaterOverlay

Properties

data_objectBodydata_objectNormalDistortiondata_objectRoughnessdata_objectSizedata_objectSortLayerdata_objectTexturedata_objectTintdata_objectTransmission
WaterOverlay
Projects a colour/alpha texture onto the water surface at this object's position. Leaves, dirt, scum and foam can use rough coverage; oil can use low roughness and translucent tint.
class Sandbox .account_tree extends Component
sealedSandbox.Engine

build Constructors 1

WaterOverlay ()

data_object Properties 8

Body
WaterBody
Automatically resolved water surface at the object's position. Uses the nearest active surface footprint. Finite surfaces take precedence at equal distances.
NormalDistortion
float
Maximum texture displacement in inches from the animated water normals. Zero disables texture distortion; lighting still uses the animated water normals.
Roughness
float
Surface roughness under the texture's alpha. Use low values for oil and higher values for foam or debris.
Size
Vector2
Footprint along the object's projected X and Y axes, in inches, multiplied by its XY scale.
SortLayer
int
Higher layers blend over lower ones. Equal layers use a stable component identity order.
Texture
Texture
Colour and coverage alpha. Defaults to the existing standalone foam wake.
Tint
Color
Colour tint and opacity. Lower alpha leaves some water transmission visible.
Transmission
float
Transmission through covered pixels. Zero suits opaque debris and foam; higher values allow clear oil films to change roughness without hiding the water below.

Inheritance

Component
WaterOverlay
people
Log in to reply
You can't reply if you're not logged in. That would be crazy.
Facepunch
  • News
  • Docs
  • Metrics
  • FAQ
  • Forum
  • Discord
  • Twitter