There is a template scene for the lawn mower environment in the asset package located here:
This feature is still a bit experimental and more fine tuning and optimization will come when more users test it (please send me emails if you need better control over this feature)
1. Setup the Mowing Manager
First you will need to add the BF_MowingManager component directly on your grass mesh like so:
This is required to generate markers that will be batched to gamify the grass mowing:
-Precision Value: this is how well defined do you want the grass mowing to be, this value is extremely performance heavy, I recommend not going over 30-ish or you'll see strong latency at all time
-Margin Error: When mowing the grass how much margin do you leave to the player to cut (0.1 here is 10%) value is between 0 and 1
-Generate Markers: Press this to generate all the markers that will be used to keep track of how much grass the player has cut down
-Show Debug: Press this button to show all the markers, be aware this is very heavy on the editor side
2. Setup the Mowing Tool
Then you will need to have a particle system set to TransparentFx layer with the BF_MowingTool component.
The material is set to the MowingParticle material which is mostly blue colored.
-Distance To Fill Markers: this is the value distance of how close the particle system has to be at any moments to "complete" a marker, the higher the value the more distance it will cover (like if you're scaling up the tractor)
This value is not dynamic so you'll have to set it yourself if you change anything
-Particle Feedback: this is the particle system that throws out feedback grass, purely aesthetic you can disregard it if you want
If you need to scale up or down the particle size, you should also scale the Distance To Fill Markers value.
3. Use the Public values in your project
Now at this point the scripts I added are simply to help you create a good structure for your lawn mower project or mechanic, this is not a full project with winning conditions etc... It's only a demo to get you started.
I added a canvas to show how much mowing progress the player is making, you can get the Mowing Progress value in your scripts and plug it to any win conditions or game mechanics you have.
The other fields are Percentage Text; this is the UI to show the progress value to the player (Percentage, child of the canvas)
And Mowing Manager that you simply need to correctly assign.
4. Extra stuff
The markers (here in yellow) will only get drawned where there is grass and not where the grass is already culled with ground, this works with the NoGrass texture and with the vertex color feature as well.