Skip to content

Grass Bender

Updated

Makes grass bend away as this entity moves through it.

Type
comp-grass-bender
Script class
GrassBenderComponent
Per entity
One
Version
1.1.0

Read about it in Grass: 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 -1000 ≤ x ≤ 1000
radius 0 ≤ x ≤ 100
strength 0 ≤ x ≤ 4

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(GrassBenderComponent);
if (component) log(component.props);
}