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 one or more target mesh components (StaticMesh or SkeletalMesh).
Add to an interactable actor
- Add
UEDInteractableComponentto your actor. - Add
UEDInteractionEffectsComponentto the same actor. - 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
- Pick TargetMode:
Effect selection is class-based (TSubclassOf<UEDInteractionEffect>): create one Blueprint or C++ effect class, configure it, then select that same class in the array.
Built-in effects
The plugin provides these effect classes:
UEDInteractionEffect_ShakeRotationUEDInteractionEffect_ShakeLocationUEDInteractionEffect_ScalePulseUEDInteractionEffect_MaterialScalarPulseUEDInteractionEffect_Sound
Context available to effects
Every runtime effect receives a FEDInteractionEffectContext with:
- Interaction:
InteractionContext - Interactable:
InteractableActor,InteractableTransform,InteractableLocation - Instigator:
InstigatorController,InstigatorPawn - Target:
TargetComponent,TargetMeshComponent,TargetStaticMeshComponent,TargetSkeletalMeshComponent - Target details:
TargetComponentName,TargetComponentTransform,TargetComponentLocation - View:
InstigatorViewLocation,InstigatorViewDirection - Hit data:
ResolvedHitLocation,ResolvedHitNormal,ResolvedHitBoneNameDirectHitLocation,DirectHitNormal
Useful helper functions on the effect itself:
GetPreferredEffectLocation()GetPreferredEffectNormal()GetElapsedSeconds()GetNormalizedProgress(...)GetTargetComponent()GetTargetMeshComponent()GetTargetStaticMeshComponent()GetTargetSkeletalMeshComponent()
Creating a custom effect in Blueprint
- Create a Blueprint class derived from
UEDInteractionEffect. - Override:
On StartOn Tick(optional)On Finish(optional)
- Use the event parameters or
GetEffectContext()to access target/view/hit data. - Call
Finish()when the effect is done.
Manual triggering API
Besides automatic binding, UEDInteractionEffectsComponent also exposes:
PlayConfiguredEffects(...)StopAllEffects()StopEffectsOnChannel(...)GetNumActiveEffects()
That makes it easier to reuse the same configured effect lists from Blueprint or C++ when you want explicit control instead of only relying on interactable delegates.