This page may not work correctly inside the Unity editor. Open in browser

Object Interaction

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:

  1. 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.
  2. Scroll down to the "Interaction" section in the material editor, and enable interaction.

For scene objects:

  1. Select the game object in the scene that you want the vegetation to interact with.

  2. 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)

  3. 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.
  4. 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.



Was this article helpful?
4 out of 4 found this helpful