🌐Interaction

First of all, make sure you have followed the Installation instructions. The render feature you set-up in the installation is required for the interaction to work. You can see how interaction works in the included demo scene.

Make an object interactive

To make any mesh, particle, trail or line interact with the grass, add the Discover Interactive script to it as a new component. You can do this simply by adding it as a new component like any other script, or add it to the selected gameobject via Component/Discover/Stylized Grass/Interactive.

This will convert the material of the object to a auto-generated material that communicates with the grass render feature to allow performant interaction.

Make sure you have Gizmos enabled in the editor to view where the object will interact.

If you want to keep the object visible and interact with the grass. You can simply add a new child of the object and make that the interaction mesh.

Last updated