AFM_Abilities
The architectural root of the framework: the ability and interaction base classes, sockets, Source Info, haptics and the actor registry. Almost everything else depends on this plugin.
What it gives you
- The four base classes every interactive system is built from
- The blocker activation model
- Source Info, the identity struct passed through every interaction
- Haptics helpers that resolve to the correct hand automatically
Requires
Description
This is the plugin to understand first. It defines no gameplay of its own — it defines the contract everything else follows.
Four component base classes cover the possible places an interaction can originate or land.
BPC_PawnAbility sits on the pawn and represents something the player can do as a whole.
BPC_ControllerAbility sits on a motion controller and represents something one hand can do.
BPC_ActorAbility covers abilities on non-player actors. BPC_Interaction sits on the target and
declares what may be done to it.
The design goal is that a target object never knows what kind of player is acting on it. It receives
ST_SourceInfo — pawn, component, identifier — and that is enough to distinguish left hand from
right, or one ability from another, without referencing a single pawn or controller class. That one
decision is what makes the same content work in VR, on desktop and on mobile.
Activation is managed through blockers rather than booleans. See The blocker system for why, and for the pitfalls.
Setup
This plugin is a dependency rather than something you configure. It is enabled by every UX plugin and by the pawns.
- Enable
AFM_AbilitiesalongsideAFS_Libraries. - Nothing else is required — the base classes become available to derive from and the libraries appear in the node palette.
You will rarely add these base components to an actor directly. You add the concrete subclasses that
the UX plugins provide, such as BPC_Interaction_Select or BPC_PawnAbility_Grip.
Usage
Suppressing an ability
Call SetActiveWithBlocker (controller and actor abilities) or SetBlockerAndCheckActive (pawn
abilities) with a reason name. Call again with the same reason and false to release.
Suppressing a whole class of abilities
Call setAbilityRestriction on the pawn with a component tag. Every ability on the pawn and on both
motion controllers carrying that tag is suppressed under your reason, in one call. This is how the
menu disables movement while it is open.
Giving one ability exclusive use of a hand
Call MC_SetFocusControllerAbility on the motion controller with the ability that should keep
running. Everything else on that hand is blocked with the reason Unfocussed.
Playing haptics
Call FL_Haptics.Haptics_Effect with the Source Info you received. It resolves the correct hand
itself, and does nothing on platforms without haptics — no branching required.
Reading who acted on you
Every interaction call gives you Source Info. getSidesFromAbility turns it into one hand or both;
the Identifier field distinguishes abilities of the same type.
Key properties
| Property | On | When to change |
|---|---|---|
Identifier | All abilities | Set when a target needs to distinguish this ability from another of the same class — a fingertip versus a whole hand, for example |
Blockers | All abilities | Never edit directly; use the blocker API so reasons are tracked |
Relevant Components | BPC_Interaction | When only some of the actor's meshes should be interactive |
Highlight Class | BPC_Interaction | Choose the highlight style; leave empty for no hover feedback |
Highlight Tag | BPC_Interaction | When only some meshes should highlight |
Default Interaction State | BPC_Pawn_InteractionState | To change the resting cursor and accent colour |
Extending
Derive from BPC_Interaction to add a new interaction type, and pair it with an interface exposing a
CanBe… function that returns an override flag and an answer. Call TickHighlight while hovering
and highlighting works for free.
Derive from BPC_PawnAbility or BPC_ControllerAbility for new abilities. Override
ComponentActivated and ComponentDeactivated to add and remove your input mapping context — doing
it there means the blocker system manages your input automatically.
See Extending the framework for the full pattern.
Example map
No dedicated map — every UX example map exercises this plugin. Map_Examples_Select is the smallest complete demonstration.
Troubleshooting
An ability stopped responding and nothing changed. A blocker was added and never removed, almost
always because the release call used a different reason name. Inspect the ability's Blockers array
at runtime; it lists exactly what is holding it down.
My interaction never highlights. Highlight Class is empty, or the actor's meshes do not carry
Highlight Tag. Leave the tag empty to highlight everything.
API reference
Every blueprint asset in this plugin. Expand an asset to see its members.
Components
BPC_ActorAbility4 members
| Kind | Name | Signature | Description |
|---|---|---|---|
| var | IdentifierIdentifier | name | Name used to identify this ability when it is reported through Source Info, so interaction targets can tell which ability acted on them. Leave as None if the ability does not need to be distinguished from others on the same actor. |
| var | BlockersBlocker | name[] | Live list of reasons this ability is currently suppressed. The ability is active only while this list is empty; entries are added and removed through Set Active With Blocker rather than edited directly. |
| fn | getAllAttachedActorsAbility | (out Actors: Actor[]) | Returns every actor this ability currently owns or has attached to itself. Override in a child ability that spawns actors so the owning motion controller can collect them. |
| fn | SetActiveWithBlockerBlocker | (Set: bool, Reason: name) | Suppresses or releases this ability under a named reason. Multiple systems can block the same ability independently; it only reactivates once every reason has been removed. |
BPC_AttachmentRegistry4 members
| Kind | Name | Signature | Description |
|---|---|---|---|
| fn | getRegisteredActorsRegistry | (Attached: bool, NonAttached: bool, out Actors: Actor[]) | Returns the actors registered with this owner, filtered by whether they are currently attached, not attached, or both. |
| event | RegisterActor | (Actor: Actor, Attached: bool) | Adds an actor to this owner's registry and records whether it is attached. The registry automatically drops the actor again when it is destroyed. |
| event | OnDestroyed_Event | (DestroyedActor: Actor) | Internal handler that removes a registered actor from the registry when that actor is destroyed. |
| event | UnregisterActor | (Actor: Actor) | Removes an actor from this owner's registry. |
BPC_ControllerAbility6 members
| Kind | Name | Signature | Description |
|---|---|---|---|
| var | IdentifierIdentifier | name | Name used to identify this ability when it is reported through Source Info, so interaction targets can tell which hand or ability acted on them. |
| var | BlockersBlocker | name[] | Live list of reasons this ability is currently suppressed. The ability is active only while this list is empty; entries are added and removed through Set Active With Blocker rather than edited directly. |
| fn | getAllAttachedActorsAbility | (out Actors: Actor[]) | Returns every actor this ability currently owns or has attached to itself, so the motion controller can gather everything it is carrying. |
| fn | SetActiveWithBlockerBlocker | (Set: bool, Reason: name) | Suppresses or releases this ability under a named reason. Used by other abilities to take exclusive control of a hand without permanently disabling what they interrupted. |
| event | InitiateControllerAbility | (Pawn: Pawn, MotionController: Actor, Side: E_Side) | Called by the motion controller once it has been spawned, handing the ability its owning pawn, controller actor and hand side. Extend this to run setup that needs to know which hand it belongs to. |
| event | SetVisible | (Set: bool) | Shows or hides this ability's visual representation without deactivating its logic. |
BPC_Interaction12 members
| Kind | Name | Signature | Description |
|---|---|---|---|
| var | RelevantComponentsConditions | name | Component tag limiting which of the owner's primitive components respond to this interaction. Leave empty to make every primitive component of the actor interactive. |
| var | HighlightClassHighlight | Class<BPC_Highlight> | Highlight component spawned on demand when this interaction is hovered. Choose the material, mesh-copy or post-process variant depending on how the object should read; leave empty for no highlight. |
| var | HighlightColorHighlight | LinearColor | Colour passed to the highlight component when it is created. Use it to signal interaction type or state, for example a warning colour on a locked object. |
| var | HoverSoundHighlight|Sound | SoundBase | Sound played once when this interaction starts being hovered. |
| var | UnhoverSoundHighlight|Sound | SoundBase | Sound played once when hovering over this interaction ends. |
| var | BlockersBlockers | name[] | Live list of reasons this interaction is currently suppressed. The interaction responds only while this list is empty. |
| var | HighlightTagHighlight | name | Component tag passed to the highlight component to limit which meshes are highlighted. Leave empty to highlight every mesh on the actor. |
| fn | SetBlockerBlocker | (Set: bool, Reason: name) | Suppresses or releases this interaction under a named reason, so several systems can disable it independently without overriding each other. |
| fn | getRelevantSocketComponentsInternal | (SocketClass: Class<BPC_Socket>) → SceneComponent[] | Returns the sockets of the given class that this interaction is allowed to use, honouring the Relevant Components tag filter. |
| event | TickHighlight | (SourceInfo: ST_SourceInfo, TraceResult: HitResult) | Called every frame while an ability is hovering this interaction. Keeps the highlight alive and broadcasts On Highlight Tick; highlight ends automatically when the calls stop. |
| event | OnDestroyed_Event_0 | (DestroyedActor: Actor) | Internal handler that deactivates this interaction when its owning actor is destroyed. |
| event | UpdateHighlightColor | (HighlightColor: LinearColor) | Changes the highlight colour at runtime and pushes the new colour to the active highlight component. |
BPC_PawnAbility4 members
| Kind | Name | Signature | Description |
|---|---|---|---|
| var | IdentifierIdentifier | name | Name used to identify this ability when it is reported through Source Info, so interaction targets can tell which ability acted on them. |
| fn | SetBlockerAndCheckActiveBlockers | (Set: bool, Reason: name) | Suppresses or releases this ability under a named reason and re-evaluates whether it should be active. The ability runs only when no reasons remain. |
| event | Possess | (Pawn: Pawn) | Called when the owning pawn is possessed. Caches the pawn, resolves its platform type and lifts the Unpossessed blocker so the ability can start running. |
| event | Unpossess | () | Called when the owning pawn is unpossessed. Re-applies the Unpossessed blocker so the ability stops until the pawn is possessed again. |
BPC_Pawn_InteractionState4 members
| Kind | Name | Signature | Description |
|---|---|---|---|
| var | DefaultInteractionStateSettings | PDA_InteractionState | Interaction state the pawn falls back to when nothing is being hovered. Defines the resting cursor and accent colour. |
| fn | getCurrentColor | (out Value: LinearColor) | Returns the accent colour of the interaction state currently in effect, so UI and highlights can match the active interaction. |
| event | SetInteractionState | (Style: PDA_InteractionState, Reference: Object) | Requests an interaction state for this frame. The highest-priority request wins, and the state reverts to the default shortly after requests stop arriving. |
| event | ApplyInteractionState | (CurrentInteractionState: PDA_InteractionState, Reference: Object) | Applies an interaction state immediately, swapping the mouse cursor and cursor widget. Prefer Set Interaction State so priority and fallback are handled for you. |
BPC_Socket1 members
| Kind | Name | Signature | Description |
|---|---|---|---|
| var | SocketNameSocket | name | Name of this socket. Grip and attachment logic matches sockets by name prefix, so keep the prefix consistent with the socket type you are implementing. |
DataAssets
PDA_InteractionState4 members
| Kind | Name | Signature | Description |
|---|---|---|---|
| var | PriorityPriority | int | Ranking used when several systems request an interaction state in the same frame. The highest value wins. |
| var | ColorStyle | LinearColor | Accent colour associated with this interaction state, used by highlights and UI to signal what kind of interaction is available. |
| var | MouseCursorMouse | EMouseCursor | Hardware mouse cursor shown while this interaction state is active, on desktop targets. |
| var | MouseCursorWidgetMouse | Class<WBP_MouseCursor> | Optional widget drawn in place of the hardware cursor while this state is active, for a cursor that matches your project's styling. |
Helper
BP_Helper_ControllerAbility1 members
| Kind | Name | Signature | Description |
|---|---|---|---|
| var | Side | E_Side | Hand this helper actor belongs to. Set when the owning controller ability spawns the helper. |
Interfaces
BPI_Ability1 members
| Kind | Name | Signature | Description |
|---|---|---|---|
| fn | Ability_getOwningPawnAbility | (out Pawn: Pawn) | Returns the pawn that owns this ability, regardless of whether it sits on the pawn, on a motion controller or on a player controller. |
BPI_AbilityRestriction1 members
| Kind | Name | Signature | Description |
|---|---|---|---|
| fn | setAbilityRestrictionAbility Restriction | (AbilityTag: name, Set: bool, Reason: name) | Suppresses or releases every ability carrying the given tag, under a named reason. Implemented by pawns so one system can disable a whole class of abilities at once, for example blocking movement while a menu is open. |
BPI_MotionController4 members
| Kind | Name | Signature | Description |
|---|---|---|---|
| fn | MC_SetFocusControllerAbilityMotion Controller | (ControllerAbility: BPC_ControllerAbility, Set: bool) | Gives one ability exclusive use of this controller by blocking all the others, or releases that exclusivity again. |
| fn | MC_GetAllAttachedActorsMotion Controller | (out Actors: Actor[]) | Returns every actor currently held or spawned by any ability on this controller. |
| fn | MC_SetControllerVisibilityMotion Controller | (const Set: bool) | Shows or hides the controller's visual representation, for example to hide a hand mesh while an object is held. |
| fn | MC_getMotionControllerSideMotion Controller | (out Side: E_Side) | Returns which hand this controller represents. |
BPI_MotionController_Hands7 members
| Kind | Name | Signature | Description |
|---|---|---|---|
| fn | MCHands_SnapToSocketMotion Controller Hands | (Socket: ST_Socket) | Snaps the hand mesh onto the given socket, so a held object determines the hand's position and pose. |
| fn | MCHands_getGrabWorldTransformMotion Controller Hands | (out Transform: Transform) | Returns the world transform of the hand's grab point, the position objects are picked up relative to. |
| fn | MCHands_SetHandCollisionMotion Controller Hands | (Collision: ECollisionEnabled = "NoCollision") | Changes the collision mode of the hand mesh, for example disabling collision while an object is being carried. |
| fn | MCHands_getCurrentSnapSocketMotion Controller Hands | (out Socket: ST_Socket) | Returns the socket the hand is currently snapped to, or an empty socket if the hand is free. |
| fn | MCHands_isHandOpenMotion Controller Hands | (out Open: bool) | Returns whether the hand is currently in an open pose, used to decide whether an object can be released or auto-gripped. |
| fn | MCHands_SetPoseMotion Controller Hands | (HandPose: AnimSequenceBase) | Applies a hand pose animation, typically the custom grip pose defined on the object being held. |
| fn | MCHands_GetPoseMotion Controller Hands | (out HandPose: AnimSequenceBase) | Returns the hand pose currently applied. |
BPI_PawnInfo3 members
| Kind | Name | Signature | Description |
|---|---|---|---|
| fn | Interface_getCameraPawn Info | (out Camera: SceneComponent) | Returns the pawn's camera component, so abilities can work from the view direction without knowing the pawn class. |
| fn | Interface_getPawnTypePawn Info | (out PawnType: E_Pawn_Type) | Returns whether this pawn is the VR, desktop or mobile variant, so shared abilities can branch on platform. |
| fn | Interface_RecenterCapsulePawn Info | () | Moves the collision capsule under the player's current head position without moving the tracked camera. Called after locomotion so the capsule follows real-world walking. |
BPI_SourceInfo2 members
| Kind | Name | Signature | Description |
|---|---|---|---|
| fn | getSourceInfoSource Info | (out SourceInfo: ST_SourceInfo) | Returns the Source Info describing this ability: the owning pawn, the component acting, and its identifier. Passed into every interaction so targets know who is acting on them. |
| fn | setSourceInfoSource Info | (SourceInfo: ST_SourceInfo) | Stores Source Info on this object, used by helper actors that need to remember which ability created them. |
BPI_WidgetInteraction2 members
| Kind | Name | Signature | Description |
|---|---|---|---|
| fn | Widget_SetWidgetInteractionComponentWidgetInteraction | (WidgetInteractionComponent: WidgetInteractionComponent) | Assigns the widget interaction component this object should route pointer events through. |
| fn | Widget_GetWidgetInteractionComponentWidget Interaction | (out WidgetInteractionComponent: WidgetInteractionComponent) | Returns the widget interaction component currently driving pointer events for this object. |
Interface_Socket1 members
| Kind | Name | Signature | Description |
|---|---|---|---|
| fn | Socket_getSocketName | (out Name: name) | Returns this socket's name, used to match sockets against the prefix an ability is looking for. |
Libraries
BFL_ActorRegistry3 members
| Kind | Name | Signature | Description |
|---|---|---|---|
| fn | RegisterActorRegistry | (Parent: Actor, Actor: Actor, Attached: bool, __WorldContext: Object) | Registers an actor against a parent actor and records whether it is attached. Use this to track spawned or carried actors without holding hard references. |
| fn | UnregisterActorRegistry | (Parent: Actor, Actor: Actor, __WorldContext: Object) | Removes an actor from a parent actor's registry. |
| fn | getRegisteredActorsRegistry | (Parent: Actor, Attached: bool, NonAttached: bool, __WorldContext: Object, out Actors: Actor[]) | Returns the actors registered against a parent, filtered by attachment state. |
FL_Haptics4 members
| Kind | Name | Signature | Description |
|---|---|---|---|
| fn | Haptics_EffectHaptics | (SourceInfo: ST_SourceInfo, HapticEffect: HapticFeedbackEffect_Base, __WorldContext: Object) | Plays a one-shot haptic effect on the hand or hands that the given Source Info came from. Does nothing on platforms without haptics. |
| fn | Haptics_ContinousHaptics | (SourceInfo: ST_SourceInfo, const Frequency: float = 0.5, const Amplitude: float = 0.5, __WorldContext: Object) | Starts a continuous rumble at the given frequency and amplitude on the hand the Source Info came from. Must be stopped explicitly with Haptics Stop. |
| fn | Haptics_StopHaptics | (SourceInfo: ST_SourceInfo, __WorldContext: Object) | Stops any continuous haptic feedback running on the hand the Source Info came from. |
| fn | getSidesFromAbilitySides | (Ability: ActorComponent, __WorldContext: Object, out Sides: E_Side[]) | Returns which hands an ability is associated with. A controller ability resolves to its own hand; a pawn ability resolves to both. |
ML_Actor_Input0 members
No editor-visible members; this asset configures defaults only.
ML_Actors_Haptics0 members
No editor-visible members; this asset configures defaults only.
ML_Comp_Input0 members
No editor-visible members; this asset configures defaults only.
ML_Component_Haptics0 members
No editor-visible members; this asset configures defaults only.
ML_ControllerAbilities0 members
No editor-visible members; this asset configures defaults only.
ML_Helper_ControllerAbility0 members
No editor-visible members; this asset configures defaults only.
ML_Object_SourceInfo0 members
No editor-visible members; this asset configures defaults only.
ML_PawnAbility0 members
No editor-visible members; this asset configures defaults only.
Widgets
WBP_MouseCursor1 members
| Kind | Name | Signature | Description |
|---|---|---|---|
| var | Reference | Object | Object that requested this cursor widget, available so the cursor can reflect what is being pointed at. |