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 logs 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
- Use
GameObject > Flow Core > Flow Interaction Target. - Name the object
Test Console. - Position it within reach of the actor.
- Keep
Can Interactenabled. - Set a Target radius appropriate for the object’s size.
- Place the local interaction point where the player expects to use the console.
此处插图应该是 Test Console 的 Scene Gizmo 与 Flow Interaction Target Inspector 截图;显示 Target Radius、Position Offset、Can Interact 和 Priority,并框选实际交互点。
Confirm the Owner
Use a Flow Player, or add and configure Flow Interaction Owner on the actor. For the first test:
- Set an Owner radius that overlaps the console’s Target radius.
- Use Nearest selection for a forgiving test, or Forward when facing should matter.
- Keep Owner interaction enabled.
- Enter Play Mode and inspect candidate count or current target while approaching.
If no candidate appears, enlarge the debug ranges temporarily and verify both components are enabled before changing graph logic.
Add focus feedback
Assign an optional world-space Canvas and CanvasGroup to the Target. Either enable automatic Canvas visibility or use target-side Focus and Blur routes to show and hide it.
此处插图应该是 Target 获得 Focus 前后世界空间提示 Canvas 的对比截图;同时显示 Owner 当前 Target 字段,并标出 Focus 时 CanvasGroup Alpha 的变化。
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:
- Add a Trigger or Entry you can activate.
- Add an Action with
Flow Interaction Owner InteractfromInteraction/Owner. - Resolve the intended Owner.
- On the Target’s Interact event route, add a visible diagnostic such as a log or simple object change.
- Enter Play Mode, focus the console, and request interaction.
此处插图应该是 Owner 请求 Interact 与 Target Interact 事件图的并排截图;左侧显示 Flow Interaction Owner Interact 指令,右侧显示 Target-side Interact 链及可见结果,并用箭头表示事件顺序。
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
| Symptom | Check |
|---|---|
| The Owner has no candidates | Confirm Owner and Target radii overlap and both components can interact. |
| The wrong object wins | Compare selection mode, distance, facing, and Target priority. |
| Focus appears but Interact does nothing | Confirm an interaction request reaches the current Owner and the Target event route is configured. |
| Gameplay runs during Focus | Move the gameplay consequence to Interact; keep Focus for selection feedback. |
| A scripted target is ignored | Use 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.