Skip to main content
Skip to main content

shallowWaterSimulationPaintDepthSource

shallowWaterSimulationPaintDepthSource

Description

Paints a custom depth source into the simulation. Depth sources make it so the depth in that area can never go below the specified value, acting like a source that pours out water until the surrounding area is filled to that level.

Definition

shallowWaterSimulationPaintDepthSource(entityId shallowWaterSimulation, integer sourceIndex, float x, float y, float width, float height, float angle, float depth)

Arguments

entityIdshallowWaterSimulationid of the shallow water simulation
integersourceIndexindex of the source, starting at 0, up to 16 (currently)
floatxx position of the rectangle center (world coordinates)
floatyy position of the rectangle center (world coordinates)
floatwidthwidth of the rectangle (world size)
floatheightheight of the rectangle (world size)
floatanglerotation angle of the rectangle (counter-clock wise, in radians).
floatdepthdepth of the water source