Skip to main content

Effects API

UEDInteractionEffectsComponent

Attach this component to an actor that also has UEDInteractableComponent.

Key properties:

  • TargetMode / TargetComponentTag / SpecificTargetComponent: decides which UPrimitiveComponent receives the effect.
  • ViewTraceDistance: distance used to resolve hit data from the instigator view.
  • Effects_OnInteractionSuccessful: played for successful interactions that do not destroy.
  • Effects_OnDamagedNotDestroyed: played on HitPoints damage ticks while HP > 0.
  • Effects_OnInteractionDenied: played when interaction is denied.

Useful runtime methods:

  • PlayConfiguredEffects(...): manually triggers one of the configured effect lists using a provided FEDInteractionEventContext.
  • StopAllEffects(): finishes and removes all active effects on this component.
  • StopEffectsOnChannel(...): stops every active effect using the given channel.
  • GetNumActiveEffects(): returns the number of currently active runtime effects.

UEDInteractionEffect

This is now the only effect class developers need to know.

Authoring/config:

  • Create a Blueprint or C++ class derived from UEDInteractionEffect
  • Set defaults on that class
  • Select that class in UEDInteractionEffectsComponent

Runtime behavior:

  • When triggered, the component spawns a new object of the same class
  • That runtime object receives context, target mesh data, and tick updates
  • It stays active until Finish() is called

Core properties:

  • Channel: groups effects so previous ones can be stopped cleanly.
  • bStopPreviousInSameChannel: if true, stops active effects on the same target and same channel first.
  • bRunOnDedicatedServer: if true, the effect can run on dedicated servers.

Core lifecycle:

  • OnStart / OnTick / OnFinish (native override path)
  • On Start / On Tick / On Finish (Blueprint event path: ReceiveStart, ReceiveTick, ReceiveFinish)

Blueprint/C++ helpers:

  • GetEffectContext()
  • GetOwningEffectsComponent()
  • GetTargetComponent()
  • GetTargetMeshComponent()
  • GetTargetStaticMeshComponent()
  • GetTargetSkeletalMeshComponent()
  • GetInteractableActor()
  • GetInstigatorController()
  • GetInstigatorPawn()
  • GetElapsedSeconds()
  • GetNormalizedProgress(...)
  • GetPreferredEffectLocation()
  • GetPreferredEffectNormal()
  • Finish()

FEDInteractionEffectContext

Common fields:

  • InteractionContext: original interaction context (tag, instigator, interactable actor, cooldown, deny reason, etc.)
  • InteractableActor, InteractableTransform, InteractableLocation
  • InstigatorController, InstigatorPawn
  • TargetComponent, TargetMeshComponent
  • TargetStaticMeshComponent, TargetSkeletalMeshComponent
  • TargetComponentName, TargetComponentTransform, TargetComponentLocation
  • bTargetIsStaticMeshComponent, bTargetIsSkeletalMeshComponent
  • InstigatorViewLocation, InstigatorViewDirection

Hit fields:

  • bHasResolvedHitLocation
  • ResolvedHitLocation, ResolvedHitNormal, ResolvedHitBoneName
  • bHasDirectHit, DirectHitLocation, DirectHitNormal

Resolution logic:

  • Trace from the instigator view location along the view direction and test against the target component.
  • If no component hit is found, use the closest point on collision as fallback.
  • If collision data is unavailable, use the component bounds origin.

Built-in effects

The plugin provides these built-in single-class effects:

  • UEDInteractionEffect_ShakeRotation
  • UEDInteractionEffect_ShakeLocation
  • UEDInteractionEffect_ScalePulse
  • UEDInteractionEffect_MaterialScalarPulse
  • UEDInteractionEffect_Sound