EDInteractionLib
UEDInteractionLib is a UBlueprintFunctionLibrary containing reusable helpers.
Header:
Source/EDInteractionSystem/Public/Library/EDInteractionLib.h
Instanced mesh helpers
GetInstanceLocation
Gets the world location of an instance by index.
GetInstanceIndexAtLocation
Finds an instance index at a world location. Also reports whether multiple instances share the same location.
This is used heavily by:
- Replication of removed foliage instances
- Respawn logic
- Server validation of foliage hit items
RemoveInstanceByHitItem
Removes an instance using its instance index (HitItem) on an instanced component.
GetInteractableFoliageDataByStaticMesh
Looks up the configured FEDFoliageInteractionData for a mesh using Project Settings.
Trace method helpers
ResolveTraceMethod
Resolves UseDefaultMethod to the given default method.
AllowsDirectTrace
Returns whether a trace method allows direct tracing.
Scoring helpers
ComputeLookAtPercentage
Computes how well the target is aligned with the camera forward vector.
ProcessInteractionTarget
Central helper used by the player component to:
- Validate a candidate (distance/look-at policy)
- Compute its score
- Decide whether auto-interaction should trigger
Validation helpers
IsViewOnActorBlocked
Checks line-of-sight between a view start and an actor “center”, optionally using a list of dimension components.
IsViewOnFoliageInstanceBlocked
Checks line-of-sight against a foliage instance.