Skip to content
Plugin 1.0 · Unreal Engine 5.8Source snapshot · Version details

World interaction ​

Create an interaction point ​

Add URicInteractionPoint to a world actor at the location used for interaction. For shared multiplayer state, the owning actor must replicate.

Bind gameplay to OnServerExecuteInteraction, and cosmetic feedback to OnClientExecuteInteraction as appropriate. The point's bSendServerEvent defaults to true. Interaction fragments provide configurable initialization, including URicInteractionFragmentName.

An interaction point does not automatically create loot or move inventory items. Connect its server event to the gameplay operation you need.

Set up the interactor ​

Add URicInteractorComponent to the local player's pawn. Set its instanced InteractionStrategy in the component configuration to URicInteractionStrategyClosestVisiblePoint.

Bind your input action to ExecuteInteraction(). Inspect SelectedPoint, VisiblePoints, and CanInteractWithSelectedPoint() for prompt presentation.

Search settings ​

The closest-visible-point strategy declares:

  • MaxDistance = 500
  • MaxAngleDegrees = 45
  • MaxBestPointDistance = 200
  • TraceChannel = ECC_Visibility
  • bTraceComplex = false

The interactor's search interval defaults to 0.1 seconds. Distance, view-angle, and visibility tests belong to the client strategy.

Visibility and availability ​

State is represented by replicated tag stacks:

  • Ric.Interaction.Disabled prevents interaction.
  • Ric.Interaction.Hidden excludes a point from discovery.

Without either tag, a point is discoverable and enabled. Use SetInteractionEnabled and SetShowInteractionPoint on the server for shared changes. Hiding and disabling are independent.

If a point moves, call RefreshSpatialIndex() to update its spatial-grid entry. There is no automatic per-frame spatial-index refresh.

UI listeners ​

Implement IRicInteractionInterface in your prompt widget or another listener. Register it with RegisterUIListener, and unregister it when destroyed.

The callbacks report availability, selection, deselection, and execution results: OnInteractionAvailable, OnInteractionUnavailable, OnInteractionSelected, OnInteractionDeselected, and OnInteractionExecute.

Server execution scope ​

The server checks the point's interaction state, but trusts the client's point selection for distance and visibility by design. Add any server-side distance, ownership, or game-rule checks required by your project before performing authoritative rewards or transfers.