Skip to content

A mower that cuts the grass it drives over

Updated

Drag a mower across a lawn and it cuts a strip through the grass, saving the mowed area to the grass mask a second after it stops: a Grass component painted by a Behavior script.

Drag the amber mower over the grass, then let go: "Lawn saved" appears in the log. Drag the background to orbit the camera, scroll to zoom.

A mower that cuts the grass it drives over

The script is explained step by step in A mower that cuts the grass it drives over.

Download the project file below, then import it in XR Hub with Projects › New › Import, as described in Projects and templates. It opens in XR Creator with the same scene you see running above, each script already attached to its Behavior entity. From there you can edit the scripts, adjust components and their props, preview your changes, and deploy the result as a world of your own.

GrassMower.xrproj