AFS_UX_Select
Selection by fingertip, laser or desktop click, with priority resolution and interface-based vetoes.
What it gives you
- One interaction that works with mouse, laser and fingertip
- Priority resolution when objects overlap
- Hit-location override for precise pointing
Requires
AFA_Sounds AFL_Libraries AFM_Abilities AFM_AutoDestroy AFM_Spline AFM_WidgetInteraction AFS_Core_MotionController AFS_UX_Grip
Required by
Description
Select is the smallest complete interaction stack in the framework and the best one to read when learning the pattern.
BPC_PawnAbility_Select traces from the pawn and resolves the highest-priority selectable component
under the cursor. BPC_Interaction_Select on the target declares selectability and fires
On Select. Interface_Select on the owning actor can veto, or redirect where a pointer appears
to hit.
The same interaction serves all three input methods, because the ability supplies the trace and the target only cares about the resulting Source Info.
Setup
- Confirm
BPC_PawnAbility_Selectis on the pawn, andBPC_ControllerAbility_Hand_Laseror_Hand_Fingeron the motion controllers for VR. - Add
BPC_Interaction_Selectto any actor and bind On Select.
Usage
Basic selection
See Make an object selectable.
Vetoing
Implement Interface_Select and return Override = true with Is Selectable = false.
Redirecting the pointer
Implement Select_HitLocationOverride to make a laser terminate at a chosen point rather than the
raw trace hit — useful for snapping to a control's centre.

Key properties
| Property | When to change |
|---|---|
Select Sound | Feedback on selection |
Relevant Components | Restrict which meshes are clickable |
Select Interaction Style | The cursor and accent colour shown while hovering something selectable |
Min / Max Laser Length | On the laser ability, to change reach |
Extending
Copy this stack's shape when adding your own interaction type — it is the reference implementation. See Extending the framework.
Multiplayer notes
BPC_Interaction_Select implements IOutsidePawnRPCInterface, so selection replicates without routing through the pawn. Requires AFPNetDriver.
Example map
Map_Examples_Select covers click, laser and fingertip selection with vetoes.
Troubleshooting
Nothing is selectable. The pawn is missing BPC_PawnAbility_Select, or the object's meshes have no collision on the trace channel.
API reference
Every blueprint asset in this module. Expand an asset to see its members.
Components/ControllerAbilities
BPC_ControllerAbility_Hand_Finger2 members
Hand ability giving one motion controller a fingertip poke, for pressing world widgets and near objects at very short range. Add it to a hand controller and position it at the index fingertip, as the showroom hands do, then set the trace distance in centimetres.
| Kind | Name | Signature | Description |
|---|---|---|---|
| var | Trace DistanceSettings | float | How far ahead of the fingertip the selection trace reaches. |
| var | Sound PressSound | SoundBase | Cue played when this hand's fingertip presses a widget. It is handed to the widget interaction helper the ability spawns rather than played here, so leaving it empty makes poking UI with this hand silent. |
BPC_ControllerAbility_Hand_Laser15 members
Hand ability giving one motion controller a pointing laser. It traces ahead of the hand each frame, keeps the highest-priority select interaction highlighted and feeds the widget interaction helper, so world widgets can be clicked and scrolled. Pressing select clicks the widget or presses the interaction. Add it to a hand controller and set the length, thickness and colour.
| Kind | Name | Signature | Description |
|---|---|---|---|
| var | Min Laser LengthSettings | float | Shortest the laser is drawn when it hits something close by. |
| var | Max Laser LengthSettings | float | Maximum reach of the selection laser. |
| var | Mapping Contexts DefaultInput | ST_MappingContext_Side | Input mapping contexts applied for the left and right hand. |
| var | Sound PressSound | SoundBase | Cue played when this hand's laser presses a widget. It is handed to the widget interaction helper the ability spawns rather than played here, so leaving it empty makes clicking UI with the laser silent. |
| var | ThicknessSettings | float | Thickness of the laser beam. |
| var | ColorSettings | LinearColor | Colour of the laser beam. |
| var | Shoulder Offset | Vector | Estimated shoulder position relative to the head, the laser aims from it. |
| var | Aim Interp Speed | float | Speed at which the aim follows the hand. |
| var | Aim Interp Speed Steady | float | Slower aim speed while the hand moves only a little, to steady the beam. |
| var | Adapt Range Degrees | float | Angle below which a hand movement counts as small and uses the steady aim speed. |
| fn | SetWidgetFocus | (Set: bool) | Gives this hand's focus to the laser while it points at an interactive widget, and hands it back when it stops, like the controller laser does. While the laser has the focus the hand's other abilities pause, so the thumbstick scrolls the widget instead of moving the player. Only acts when the state changes (Has Widget Focus): called from Tick on a hover change, and with false when the ability is deactivated, where it does nothing unless the laser holds the focus. |
| fn | IsHandtracking? | (out Active: bool) | — |
| fn | AimFromShoulderDefault | (DeltaSeconds: float) | Turns the laser to point along the line from the estimated shoulder through the hand, easing at the aim speeds. |
| fn | HandleSelectDefault | () | Runs a selection against whatever the laser is currently pointing at. |
| fn | SetHoverStateDefault | () | Updates the laser's hover appearance and returns an alternate endpoint when the target overrides its hit location. |
Components/Interactions
BPC_Interaction_Select5 members
Interaction making its owner selectable, whether by a hand laser, a fingertip or a desktop click. It answers whether it may be selected right now, lets the owner veto or move the reported hit point through the select interface, and on press broadcasts On Select with the source info, plays the select sound and fires the haptic effect. Add it to any actor that should respond to being clicked.
| Kind | Name | Signature | Description |
|---|---|---|---|
| var | Select SoundSound | SoundBase | Sound played at the hit location when this object is selected. |
| fn | HandleSelect | (Source Info: ST_SourceInfo, Hit Result: HitResult) | Broadcasts On Select without playing feedback, for triggering a selection from code. |
| fn | OverrideHitLocationSelect | (out Override: bool, out HitLocation: Vector) | Lets the owner supply a different hit location, so a laser can terminate on a chosen point rather than the raw trace hit. |
| fn | Can be SelectedSelect | (HitComponent: PrimitiveComponent, SourceInfo: ST_SourceInfo, out CanBeSelected: bool) | Returns whether this object may currently be selected by the given source, consulting Interface Select on the owner if implemented. |
| event | SelectPressed | (SourceInfo: ST_SourceInfo, HitResult: HitResult) | Fires when the object is selected, playing sound and haptics. Bind to On Select to react. |
Components/PawnAbility
BPC_PawnAbility_Select3 members
Pawn ability giving a desktop or mobile pawn the select action. Each tick it highlights the highest-priority select interaction under the pawn's trace and sets the pawn's interaction state from the chosen style; the select input then presses that interaction. Add it to a pawn along with its input mapping context. VR pawns use the hand laser instead.
| Kind | Name | Signature | Description |
|---|---|---|---|
| var | Input SelectInput | InputMappingContext | Input mapping context enabled while this ability is active, carrying the select action. |
| var | Select Interaction StyleStyle | PDA_InteractionState | Interaction state requested while hovering something selectable, controlling the cursor and accent colour. |
| event | Select | () | Runs a selection against whatever the pawn is currently pointing at. |
BPC_PawnAbility_Widget2 members
Pawn ability letting a desktop or mobile pawn use world-space widgets. It adds a widget interaction component on activation, feeds it the pawn's latest trace, maps press and scroll input onto it and passes the source info to widget components that ask who is pointing at them. Add it to a pawn beside the select ability; without it, widgets in the world cannot be clicked.
| Kind | Name | Signature | Description |
|---|---|---|---|
| var | Input WidgetInput | InputMappingContext | Input mapping context enabled while this ability is active, carrying the widget interaction actions. |
| var | Widget Interaction StyleStyle | PDA_InteractionState | Interaction state requested while hovering a widget. |
Helpers
BP_Helper_ControllerAbility_Hand_Finger0 members
Per-hand helper actor for the fingertip ability, carrying the select and hover spheres and the widget interaction component that presses world widgets at the fingertip. Spawned by the ability rather than placed, and nothing else in the framework references it; subclass it only if the fingertip needs different collision.
No editor-visible members; this asset configures defaults only.
BP_Helper_ControllerAbility_Hand_Laser1 members
Per-hand helper actor for the hand laser. It holds the VR select and scroll input bindings and forwards them, after checking they came from its own hand, to the laser ability that spawned it. Spawned by the ability rather than placed; subclass it to bind extra input to the laser.
| Kind | Name | Signature | Description |
|---|---|---|---|
| var | Controller Ability Hand Laser | BPC_ControllerAbility_Hand_Laser | The laser ability this helper draws for. |
Interfaces
Interface_Select2 members
Contract an actor implements to control its own selection. Can Be Selected can refuse a select, or defer by leaving the override off, and Select Hit Location Override replaces the point the ability reports back. Implement it on the actor owning a select interaction; without it, selection is always allowed and the real impact point is used.
| Kind | Name | Signature | Description |
|---|---|---|---|
| fn | Select_HitLocationOverrideSelect | (out Override: bool, out NewHitLocation: Vector) | Implement to redirect where a pointer appears to hit this object, for example snapping a laser to a control's centre. |
| fn | CanBeSelectedSelect | (SelectComponent: BPC_Interaction_Select, SourceInfo: ST_SourceInfo, out Override: bool, out IsSelectable: bool) | Implement on an actor to veto or allow selection under your own conditions. Return Override true and Is Selectable false to block; not implementing the interface means always selectable. |