Skip to main content
Flow Core Documentation
Menu

Flow Interaction

Building an Interactable

Create a Target that can be focused and used by a Flow Interaction Owner.

Audience
Gameplay designers and developers
Time
15 minutes
Requires
A Flow Player or GameObject with Flow Interaction Owner
Modules
Flow Interaction
On this page

Create a simple object that displays focus feedback and produces a visible result when the current Owner requests interaction. This workflow verifies scanning, selection, Focus, Blur, and Interact before connecting inventory or quest logic.

What you will build

A player approaches a console. The console becomes the current Target, its prompt appears, and an interaction request runs target-side graph logic.

Create the Target

  1. With the optional Flow Core Examples template installed, choose GameObject > Flow Core > Flow Interaction Target. Alternatively, create a GameObject and add the Flow Interaction Target component.
  2. Name the object Test Console.
  3. Position it within reach of the actor.
  4. Choose Open Full Configuration > Main and keep Can Interact enabled.
  5. Set a Target radius appropriate for the object’s size.
  6. Set Position Offset to place the interaction point. Enable Draw Debug Gizmos and look at the selected console in Scene view to check its reach.

Test Console’s interaction-point gizmo sits beside its local configuration and runtime world position.

Test Console has Radius 0.5, Priority 10, and Position Offset (0, 0.15, 0). The green gizmo locates its interaction point in the Scene. In Play Mode, Debug reports world Position (0.00, 0.98, 2.20).

Confirm the Owner

Use a Flow Player, or add and configure Flow Interaction Owner on the actor. For the first test:

  1. Choose Open Full Configuration > Main on the Owner and set a radius that overlaps the console’s Target radius.
  2. Use Nearest selection for a forgiving test, or Forward when facing should matter.
  3. Keep Owner interaction enabled.
  4. Enter Play Mode and open Debug to inspect candidate count or current target while approaching.

If no candidate appears, check Can Interact on both components. Under Main, temporarily increase the Owner’s Radius and turn it toward the console. Watch Debug > Candidates as you approach.

Add focus feedback

In the Target’s Open Full Configuration > Canvas page, assign a world-space Canvas prefab containing a Canvas and CanvasGroup to Canvas Prefab. The Target uses that prefab to create its prompt at runtime. Either enable Auto Visibility or use target-side Focus and Blur routes to show and hide it.

The same Game view shows Test Console without its prompt on the left and with the focused prompt on the right.

With Can Interact off on the Owner, the prompt is absent. When the Owner can interact and focuses Test Console, the prompt reaches Alpha 1.00. After Blur, Auto Visibility fades the prompt and releases its runtime Canvas.

Focus feedback should explain that the object is selected. It should not add the item, open the menu, or apply gameplay consequences yet.

Request interaction

From the actor’s input or test graph:

  1. In the actor’s graph, connect a Trigger you can fire (or a named Enter you can call) to an Action.
  2. Select the Action. In the Flow Inspector, use Add instruction to add Flow Interaction Owner Interact from Interaction/Owner. Select its row to open Parameters.
  3. Set Owner to the actor. Click the Owner summary to edit its binding. If the Flow Core Process runs on the same GameObject as its Flow Interaction Owner, use Payload > Self, then click Apply. Optionally bind the Bool Result to a Blackboard key.
  4. Put a Flow Core Process on Test Console and assign its response graph. In that graph, create an Interaction node, select it, and set Event to Interact in the Flow Inspector. Connect Out to an Action that logs a message or changes the console’s scale. The Target’s Events page is available separately for UnityEvent callbacks.
  5. Enter Play Mode, focus Test Console, and fire the actor’s request. Check the response on Test Console.

The actor’s request and the console’s response use separate graph routes. Their selected details show Payload Self, the Bool result, and Event Interact.

Above, the Owner requests interaction and writes its Bool result to InteractionSucceeded in Local Blackboard 0. Below, Test Console’s Interaction Trigger listens for Interact and runs Console responds. Its Set LocalScale Instruction enlarged the console during the test.

Verify the result

After this works, replace the diagnostic result with the real responsibility: open a crafting panel, start dialogue, play a pickup Gesture, modify inventory, or invoke another supported system.

Common Mistakes

SymptomCheck
The Owner has no candidatesConfirm Owner and Target radii overlap and both components can interact.
The wrong object winsCompare selection mode, distance, facing, and Target priority.
Focus appears but Interact does nothingConfirm an interaction request reaches the current Owner and the Target event route is configured.
Gameplay runs during FocusMove the gameplay consequence to Interact; keep Focus for selection feedback.
A scripted target is ignoredUse Explicit mode and set the Owner target through the supported Instruction.

What You Built

You separated actor intent from object response, made candidate selection observable, and verified the full focus-to-interact lifecycle before adding project-specific consequences.