Skip to main content

Foliage Outline

Foliage (instanced meshes) cannot be outlined by enabling custom depth on the instance directly, so EDInteractionSystem uses a different strategy.

How it works

When a foliage instance is focused:

  1. The outliner reads the instance transform from the instanced component
  2. It spawns a temporary UStaticMeshComponent
  3. It assigns the instance static mesh and applies materials (detailed) or the transparent outline material
  4. It sets the component world transform to match the instance
  5. It enables CustomDepth and sets the stencil value from FEDOutlineInfo::OutlineID

Widget location offset

Foliage configuration supports a per-mesh widget offset:

  • FEDFoliageWidgetInfo::WidgetLocationOffset
  • bWidgetOffsetRelativeToInstanceScale

The outliner positions the interaction widget in world space by transforming this offset by the instance transform.

Requirements

Same as actor outlines:

  • CustomDepth enabled
  • Post-process outline solution uses stencil indices