AFM_WidgetInteraction
Wraps Unreal's widget interaction with pointer index management, a cursor and a laser material, so several pointers can drive UMG at once.
What it gives you
- Multiple simultaneous UMG pointers
- A themed cursor and beam
- Scroll and press forwarding from any ability
Requires
Required by
Description
Unreal's widget interaction component assumes one pointer. In VR there are at least two hands, and in
multiplayer several players may drive the same replicated UI. AFM_WidgetInteraction adds pointer
index management so each pointer gets a unique index and they do not interfere.
BP_Helper_WidgetInteraction provides the visible cursor and beam, and forwards presses, releases
and scroll input attributed to the Source Info that triggered them.
Setup
- Enable
AFM_WidgetInteraction. - Add
BPC_WidgetInteractionto the ability that should drive UI, or use the helper actor. - Set Trace Distance and Auto Press On Contact to suit pointing or direct touch.
Usage
Pointing at UI
Pair with the laser ability. The laser supplies direction; this component supplies the UMG events.
Touching UI directly
Set Auto Press On Contact true for finger-touch UI, so no button press is required.
Getting a pointer index
Call WidgetInteraction_GetFreePointerIndex once per pointer.

Key properties
| Property | When to change |
|---|---|
Trace Distance | Pointer reach |
Auto Press On Contact | Direct-touch UI rather than pointing |
Sound Press | Feedback on press |
Extending
Derive from BP_Helper_WidgetInteraction for a custom cursor or beam.
Example map
Used throughout Map_Examples_UI.
Troubleshooting
Two pointers fight over the same widget. Both are using the same pointer index — obtain each from WidgetInteraction_GetFreePointerIndex.
API reference
Every blueprint asset in this plugin. Expand an asset to see its members.
Components
BPC_WidgetInteraction10 members
| Kind | Name | Signature | Description |
|---|---|---|---|
| var | Trace DistanceSettings | float | How far the pointer reaches when looking for a widget to interact with. |
| var | AutoPressOnContactSettings | bool | Presses automatically when the pointer touches a widget, instead of waiting for an input. Use for direct-touch UI. |
| var | Sound PressSound | SoundBase | Sound played when the pointer presses a widget. |
| fn | IsHoveringWidgetState | (out HoveringWidget: bool) | Returns whether the pointer is currently over an interactive widget. |
| fn | ReleaseMouseButtonInput | () | Releases the simulated mouse button on the hovered widget. |
| fn | PressMouseButtonInput | () | Presses the simulated mouse button on the hovered widget. |
| fn | ScrollInputInput | (ScrollDelta: float) | Sends a scroll wheel delta to the hovered widget. |
| fn | UpdateSourceInfoSource Info | (SourceInfo: ST_SourceInfo) | Records which ability is driving this pointer, so the widget can tell which hand or player is interacting. |
| event | UpdateColor | (Color: LinearColor) | Changes the pointer and cursor colour, for example to match the current interaction state. |
| event | OnWidgetHoveredChanged_Event | () | Internal handler fired when the hovered widget changes. |
Helper
BP_Helper_PointerIndexCounter1 members
| Kind | Name | Signature | Description |
|---|---|---|---|
| fn | getFreePointerIndex | (out IndexCounter: int) | Returns an unused pointer index, so multiple simultaneous pointers do not collide in UMG. |
BP_Helper_WidgetInteraction12 members
| Kind | Name | Signature | Description |
|---|---|---|---|
| var | ScaleStyle | float | Size multiplier for the cursor and laser visuals. |
| var | ColorStyle | LinearColor | Colour of the cursor and laser. |
| var | Sound_PressSound | SoundBase | Sound played when this pointer presses a widget. |
| fn | IsHoveringWidget | () → bool | Returns whether this pointer is currently over an interactive widget. |
| event | PressMouseButton | (SourceInfo: ST_SourceInfo) | Presses on the hovered widget, attributed to the given Source Info. |
| event | ReleaseMouseButton | (SourceInfo: ST_SourceInfo) | Releases on the hovered widget, attributed to the given Source Info. |
| event | ShowCursor | (Show: bool) | Shows or hides the pointer cursor without deactivating the pointer. |
| event | Deactivate | (DestroyAfterFadeOut: bool) | Fades the pointer out, optionally destroying the helper afterwards. |
| event | Activate | () | Fades the pointer in and starts tracing for widgets. |
| event | ScrollWheelInput | (SourceInfo: ST_SourceInfo, ScrollDelta: float) | Sends a scroll delta to the hovered widget, attributed to the given Source Info. |
| event | SetEndLocation | (TargetEndLocation: Vector) | Sets where the laser terminates, so it stops at the widget surface rather than passing through. |
| event | SetCurrentTrace | (CurrentTrace: HitResult) | Supplies the trace result the pointer should use this frame, when tracing is done by the owning ability. |
Libraries
BFL_WidgetInteraction1 members
| Kind | Name | Signature | Description |
|---|---|---|---|
| fn | WidgetInteraction_GetFreePointerIndex | (const Context: Object, __WorldContext: Object, out IndexCounter: int) | Returns an unused UMG pointer index for this world. Call once per pointer so several hands can drive the same UI. |