Skip to main content

Interaction Effects

UEDInteractionEffectsComponent lets you attach reusable effects to any interactable without changing interaction logic.

It listens to UEDInteractableComponent events and plays one or more effects on a target mesh component (StaticMesh or SkeletalMesh).

Add to an interactable actor

  1. Add UEDInteractableComponent to your actor.
  2. Add UEDInteractionEffectsComponent to the same actor.
  3. In UEDInteractionEffectsComponent:
    • Pick TargetMode:
      • FirstMeshComponent (recommended default)
      • OwnerRootPrimitive (if the root is already the mesh)
      • AllMeshComponents (apply to every mesh)
      • TaggedPrimitiveComponents (use TargetComponentTag)
      • SpecificComponent (use SpecificTargetComponent)
    • Add effect classes to one or more event lists:
      • Effects_OnInteractionSuccessful (non-destruction successful interactions)
      • Effects_OnDamagedNotDestroyed (HitPoints damage ticks while HP > 0)
      • Effects_OnInteractionDenied

Effect selection is class-based (TSubclassOf<UEDInteractionEffect>): create a Blueprint class derived from an effect, tune its default properties, then select that class in the array.

Built-in effects

The plugin provides these effect classes:

  • UEDInteractionEffect_ShakeRotation
  • UEDInteractionEffect_ShakeLocation
  • UEDInteractionEffect_ScalePulse
  • UEDInteractionEffect_MaterialScalarPulse
  • UEDInteractionEffect_Sound

Context available to effects (Blueprint)

When an effect instance starts it receives a FEDInteractionEffectContext with:

  • Interaction: InteractionContext (tag, instigator, interactable actor, etc.)
  • Target: TargetComponent plus booleans for StaticMesh/SkeletalMesh
  • View: InstigatorViewLocation, InstigatorViewDirection
  • Location data:
    • InteractableLocation
    • TargetComponentLocation
    • ResolvedHitLocation, ResolvedHitNormal, ResolvedHitBoneName
    • If a direct trace to the interactable was detected: bHasDirectHit, DirectHitLocation, DirectHitNormal

Hit resolution behavior:

  • If the target component is directly traceable along the view ray, the component hit is used.
  • Otherwise, the closest point on collision is used as a fallback.
  • If collision data is unavailable, the component bounds origin is used.

Creating a custom effect in Blueprint

  1. Create a Blueprint class derived from UEDInteractionEffect.
  2. Set up how the instance should be created:
    • Use InstanceClass with a Blueprint class derived from UEDInteractionEffectInstance, or
    • Override CreateInstance and return an object created with Construct Object from Class.
  3. Create a Blueprint class derived from UEDInteractionEffectInstance.
  4. Override:
    • OnStart
    • OnTick (optional)
    • OnFinish (optional)
  5. In the instance, use GetEffectContext() to access view/hit/target data.