Skip to content

Water Foam

Updated

Makes water foam where this entity meets the water, and in its wake as it moves through it.

Type
comp-water-foam
Script class
WaterFoamComponent
Per entity
One
Version
1.2.0

Read about it in Water: what it does, how to use it from a script, and examples.

The props the runtime declares for this component, with their defaults and accepted ranges.

Prop Default Range
offsetY 0 -10000 ≤ x ≤ 10000
radius 0.6 0 ≤ x ≤ 1000
shape "sphere"
strength 1 0 ≤ x ≤ 1

Run it in the browser, read its scripts, and download it as an XR Creator project.

#pragma lifecycle(startup)
function startup() {
const component = self.parent.getComponent(WaterFoamComponent);
if (component) log(component.props);
}