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 a hit location 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.

UEDInteractionEffect (settings)

Selected by class in the arrays above.

Key properties:

  • Channel: used to group effects (for example to stop previous transform effects).
  • bStopPreviousInSameChannel: if true, stops previous active effects on the same channel on the same component.
  • bRunOnDedicatedServer: if true, the effect can run on dedicated servers.
  • InstanceClass: runtime class spawned for this effect.

UEDInteractionEffectInstance (runtime)

Instances are spawned and ticked while active.

Entry points:

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

Utility:

  • GetEffectContext(): returns the resolved context data
  • Finish(): ends the effect instance

FEDInteractionEffectContext

Common fields:

  • InteractionContext: original interaction context (tag, instigator, interactable actor)
  • InteractableActor, InteractableLocation
  • TargetComponent, TargetComponentLocation
  • bTargetIsStaticMeshComponent, bTargetIsSkeletalMeshComponent
  • InstigatorViewLocation, InstigatorViewDirection

Hit fields:

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

Resolution logic:

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