Skip to main content

Data-Driven Foliage

Foliage interaction is configured through:

  • UEDInteractionSettings::InteractableFoliage

Each array entry is a FEDFoliageInteractionData describing one UStaticMesh type.

Key fields

CorrespondingStaticMesh

The mesh used by the instanced component. This is the key used to find the configuration at runtime.

InteractableTag

The tag used for filtering, priority, and events.

Focusing (FEDFoliageFocusInfo)

Controls:

  • Trace method policy
  • Max distance to the player
  • Look-at percentage threshold
  • Optional center offset (relative to instance transform)

Interacting (FEDInteractionInfo)

Controls:

  • Interaction method
  • Duration / hit points / button mash parameters
  • Cooldowns
  • Destruction and sound behavior

WidgetUIInfo (FEDWidgetInfo)

Controls what the interaction widget shows for this mesh type.

Outline (FEDOutlineInfo)

Controls whether outline is shown and which stencil index to use.

Effects (FEDFoliageEffectsInfo)

Lets you assign interaction effects per foliage mesh type.

This config is applied to the spawned AEDFoliageToInteractableActor (when a foliage instance is replaced with an actor), by copying the effect class lists into UEDInteractionEffectsComponent.

Fields:

  • ViewTraceDistance: how far the system traces from the instigator view to resolve hit locations for effects.
  • Effects_OnDamagedNotDestroyed: effects played for HitPoints damage ticks while HP > 0.
  • Effects_OnInteractionDenied: effects played when interaction is denied.
  • Effects_OnInteractionSuccessful: effects played for successful non-destruction interactions.

Respawn (FEDFoliageRespawnInfo)

Controls whether removed instances should respawn and how long it takes.

HitPoints foliage

When a foliage entry is configured as HitPoints, the system can replace an instance with a spawned actor (AEDFoliageToInteractableActor) to allow damage application and per-instance behavior.