Requires the full Nature Shaders package.
Not supported in Nature Shaders Essentials. (Learn more)
Vegetation that uses the "Grass" or "Vegetation" shader can interact with other objects in the scene. The vegetation will sway when an object moves through it.
Follow these steps to enable interaction:
For the vegetation object:
- Select the material of the vegetation, and ensure that it is using the "Nature Shaders/Grass" or "Nature Shaders/Vegetation" shader.
Note: For URP and HDRP the shaders are in the "Universal Render Pipeline" or "HDRP" sub-category.
- Scroll down to the "Interaction" section in the material editor, and enable interaction.
For scene objects:
- Select the game object in the scene that you want the vegetation to interact with.
- If the game object does not yet have any collider, then add a collider. The collider is used for interaction.
(box, sphere, and capsule colliders are supported)
- Add a Nature Collider component. This component will register the colliders on the object as colliders that should interact with vegetation.
Note: Only the colliders on the same game object are registered. Colliders in children are not registered.
- That's it, the vegetation should now interact with the object and sway when the object moves around. Both in edit-mode and at runtime.