Water Caustics
Updated
Paints moving caustic light on this entity where it is under the water, seen while the camera is under a Water Volume.
- Type
comp-water-caustics- Script class
WaterCausticsComponent- Per entity
- One
- Version
- 1.1.0
Read about it in Water: what it does, how to use it from a script, and examples.
Properties
Section titled “Properties”The props the runtime declares for this component, with their defaults and accepted ranges.
| Prop | Default | Range |
|---|---|---|
strength |
1 |
0 ≤ x ≤ 1 |
Live example
Section titled “Live example”Run it in the browser, read its scripts, and download it as an XR Creator project.
Live example
A mini pool you can dive intoA garden pool of clear water: caustic light dances on its tiled floor, the walls are wet at the waterline, a beach ball bobs with foam round it, and a Water Volume lets the camera go under the surface.
Drag to orbit round the pool. Scroll in to dive under the surface: the water fogs the view, bubbles drift past and caustics play on the floor. Scroll out to come back up.
From a script
Section titled “From a script”#pragma lifecycle(startup)
function startup() { const component = self.parent.getComponent(WaterCausticsComponent); if (component) log(component.props);}